[BUGFIX] Warning in SearchController 12/30512/5
authorChristian Zenker <christian.zenker@aoe.com>
Mon, 2 Jun 2014 11:49:00 +0000 (13:49 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Thu, 5 Jun 2014 11:44:23 +0000 (13:44 +0200)
$this->sWArr is not defined SearchController.
Fix this to use the correct $this->searchWords variable.

Change-Id: Iba888f1a47dcc0952ffbbb1e3bb4413435c2a95e
Resolves: #59277
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/30512
Reviewed-by: Alexander Opitz
Reviewed-by: Christian Zenker
Tested-by: Christian Zenker
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/indexed_search/Classes/Controller/SearchController.php

index 34b014a..5a9e75b 100644 (file)
@@ -369,7 +369,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
                        // Prepare search words for markup in content:
                        if ($this->settings['forwardSearchWordsInResultLink']) {
                                $markUpSwParams = array('no_cache' => 1);
-                               foreach ($this->sWArr as $d) {
+                               foreach ($this->searchWords as $d) {
                                        $markUpSwParams['sword_list'][] = $d['sword'];
                                }
                        } else {
@@ -604,7 +604,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
        }
 
        /**
-        * Marks up the search words from $this->sWarr in the $str with a color.
+        * Marks up the search words from $this->searchWords in the $str with a color.
         *
         * @param string $str Text in which to find and mark up search words. This text is assumed to be UTF-8 like the search words internally is.
         * @return string Processed content
@@ -615,7 +615,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
                $str = preg_replace('/\\s\\s+/', ' ', $str);
                $swForReg = array();
                // Prepare search words for regex:
-               foreach ($this->sWArr as $d) {
+               foreach ($this->searchWords as $d) {
                        $swForReg[] = preg_quote($d['sword'], '/');
                }
                $regExString = '(' . implode('|', $swForReg) . ')';