[BUGFIX] EXT:indexed_search: Ensure that sword is a string 51/53451/2
authorDaniel Goerz <dlg@lightwerk.com>
Tue, 4 Jul 2017 11:15:58 +0000 (13:15 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 13 Jul 2017 14:38:21 +0000 (16:38 +0200)
Resolves: #81782
Releases: master,8.7
Change-Id: I3bd19d8b796f7ec0d64961d45cb6937da2a06301
Reviewed-on: https://review.typo3.org/53451
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/indexed_search/Classes/Controller/SearchController.php

index 08a6c13..f761cc1 100644 (file)
@@ -37,7 +37,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
      *
      * @var string
      */
-    protected $sword = null;
+    protected $sword = '';
 
     /**
      * @var array
@@ -1558,7 +1558,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
      */
     public function setSword($sword)
     {
-        $this->sword = $sword;
+        $this->sword = (string)$sword;
     }
 
     /**
@@ -1567,6 +1567,6 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
      */
     public function getSword()
     {
-        return $this->sword;
+        return (string)$this->sword;
     }
 }