[BUGFIX] Do not call bidir_htmlspecialchars as static function 93/36893/2
authorMarkus Klein <klein.t3@reelworx.at>
Sat, 14 Feb 2015 10:52:49 +0000 (11:52 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 14 Feb 2015 10:53:18 +0000 (11:53 +0100)
The static call of bidir_htmlspecialchars throws a notice.
Just refactored the code to use the class instance instead.

Resolves: #64827
Releases: master, 6.2
Change-Id: I384646ccb07c05e5db76100228f3bb61c2a07d93
Reviewed-on: http://review.typo3.org/36893
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php

index 27d6e0e..a8d1216 100644 (file)
@@ -597,8 +597,9 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
         * @return string Processed content
         */
        protected function markupSWpartsOfString($str) {
+               $htmlParser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Html\\HtmlParser');
                // Init:
-               $str = str_replace('&nbsp;', ' ', \TYPO3\CMS\Core\Html\HtmlParser::bidir_htmlspecialchars($str, -1));
+               $str = str_replace('&nbsp;', ' ', $htmlParser->bidir_htmlspecialchars($str, -1));
                $str = preg_replace('/\\s\\s+/', ' ', $str);
                $swForReg = array();
                // Prepare search words for regex:
index 3b505b9..2ba182f 100644 (file)
@@ -1942,8 +1942,9 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
         * @todo Define visibility
         */
        public function markupSWpartsOfString($str) {
+               $htmlParser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Html\\HtmlParser');
                // Init:
-               $str = str_replace('&nbsp;', ' ', \TYPO3\CMS\Core\Html\HtmlParser::bidir_htmlspecialchars($str, -1));
+               $str = str_replace('&nbsp;', ' ', $htmlParser->bidir_htmlspecialchars($str, -1));
                $str = preg_replace('/\\s\\s+/', ' ', $str);
                $swForReg = array();
                // Prepare search words for regex: