Issue Bug Closed

#72931Indexed search with strict standards

Benno Flory 01/25/16, 14:52 updated 10/02/18, 11:19

Description

When posting the search form with an empty search field, I get 2 strict standard warnings (although error reporting is switched off):

Strict Standards: Declaration of TYPO3\CMS\IndexedSearch\Controller\SearchFormController::pi_list_browseresults() should be compatible with TYPO3\CMS\Frontend\Plugin\AbstractPlugin::pi_list_browseresults($showResultCount = 1, $tableParams = ‘’, $wrapArr = Array, $pointerName = ‘pointer’, $hscText = true, $forceOutput = false) in /var/www/vhosts/az-direct.ch/httpdocs/typo3_src-6.2.15/typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php on line 2423

Strict Standards: Only variables should be assigned by reference in /var/www/vhosts/az-direct.ch/httpdocs/typo3_src-6.2.15/typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php on line 537

My (probably dirty, but workung) solutions:

Old lines 1589…: * param boolean $showResultCount Show result count * param string $addString String appended to “displaying results…” notice. * param string $addPart String appended after section "displaying results... * param string $freeIndexUid List of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration! * return string HTML output * todo Define visibility
*/
public function pi_list_browseresults($showResultCount = TRUE, $addString = ‘’, $addPart = ‘’, $freeIndexUid = -1) {

New lines 1589…: * param integer $showResultCount Show result count * param string $addString String appended to “displaying results…” notice. * param array $addParts Array containing string appended after section "displaying results... * param string $freeIndexUid List of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration! * param boolean $strictStandardsDummy1 - See BUGFIXES above * param boolean $strictStandardsDummy2 – See BUGFIXES above * return string HTML output * todo Define visibility
*/
public function pi_list_browseresults($showResultCount = 1, $addString = ‘’, $addParts = array(), $freeIndexUid = ‘-1’, $strictStandardsDummy1 = TRUE, $strictStandardsDummy2 = TRUE) {

Old line 1638: $addPart .= ‘
New line 1638: $addParts[] = ‘

Old line 1656: . $addPart . ‘‘;
New line 1656: . implode(‘’, $addParts) . ‘‘;

Old line 537: if ($hookObj = &$this->hookRequest(‘getResultRows_SQLpointer’)) {
New line 537: if ($hookObj = $this->hookRequest(‘getResultRows_SQLpointer’)) {

My versions: TYPO3 CMS 6.2.15 / PHP 5.4.36

Reviews 2