[BUGFIX] Indexed Search: Fix warning for empty search word 22/45222/4
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Sat, 12 Dec 2015 13:41:52 +0000 (14:41 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 12 Dec 2015 21:25:11 +0000 (22:25 +0100)
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 <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/indexed_search/Classes/Controller/SearchController.php

index 2db18aa..69a0503 100644 (file)
@@ -805,6 +805,8 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
                                $search->register_and_explode_search_string($searchWords);
                                if (is_array($search->sword_array)) {
                                        $sWordArray = $this->procSearchWordsByLexer($search->sword_array);
+                               } else {
+                                       $sWordArray = array();
                                }
                        }
                }