Bug #69317

Epic #65814: Make Indexed search extbase plugin shine

Indexed Search: errors in experimental mode when searching for empty string

Added by Manuel Link about 4 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2015-08-26
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When searching for an empty string in experimental mode several warnings like
"Core: Error handler (FE): PHP Warning: Invalid argument supplied for foreach()"
appear in the log.
Sometimes (I think the first time searching for an empty string after flushing the caches) it even results in a php-error like
"Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1237900529: The argument "each" was registered with type "array", but is of type "boolean" in view helper "TYPO3\CMS\Fluid\ViewHelpers\ForViewHelper""

The reason for this is the return value of the function "getSearchWords" in the file SearchController.php,
which is "FALSE" instead of an array.

I can think of two possible solutions of this problem:

initializing "$sWordArray" as an empty array instead of "FALSE",
or checking whether it is an Array at the end of the function and setting it as an array if it isnt.

Associated revisions

Revision 41bc634c (diff)
Added by Tymoteusz Motylewski almost 4 years ago

[BUGFIX] Indexed Search: Fix warning for empty search word

The Extbase plugin throws a warning when the search word is empty.
This was already fixed in a bigger change in v7, which can not be
easily backported. This is a simple fix for v6.

Resolves: #69317
Releases: 6.2
Change-Id: I185bca27f9ee7563deb8ae943563915a6e5f0a62
Reviewed-on: https://review.typo3.org/45222
Reviewed-by: Daniel Goerz <>
Tested-by: Daniel Goerz <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

History

#1 Updated by Tymoteusz Motylewski about 4 years ago

  • Parent task set to #65814

#2 Updated by Tymoteusz Motylewski almost 4 years ago

confirmed in 6.2.15. Bug is fixed already in 7.

#3 Updated by Gerrit Code Review almost 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45222

#4 Updated by Gerrit Code Review almost 4 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45222

#5 Updated by Gerrit Code Review almost 4 years ago

Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45222

#6 Updated by Tymoteusz Motylewski almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF