[BUGFIX] System>Configuration: Fix search in 27/38327/8
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 29 Mar 2015 00:44:47 +0000 (01:44 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Mon, 30 Mar 2015 12:47:39 +0000 (14:47 +0200)
Only search in data which are scalars.

Resolves: #60851
Releases: master, 6.2
Change-Id: I571bb69aeb37d5e407c3c7e78b8eff538852b4fa
Reviewed-on: http://review.typo3.org/38327
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php
typo3/sysext/lowlevel/Resources/Private/Language/locallang.xlf

index 36885b8..42b6d13 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Lowlevel\Utility;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 
@@ -195,14 +194,14 @@ class ArrayBrowser {
                        $deeper = is_array($keyArr[$key]);
                        if ($this->regexMode) {
                                if (
-                                       preg_match('/' . $searchString . '/', $keyArr[$key])
+                                       is_scalar($keyArr[$key]) && preg_match('/' . $searchString . '/', $keyArr[$key])
                                        || $this->searchKeysToo && preg_match('/' . $searchString . '/', $key)
                                ) {
                                        $this->searchKeys[$depth] = 1;
                                }
                        } else {
                                if (
-                                       !$deeper && stristr($keyArr[$key], $searchString)
+                                       is_scalar($keyArr[$key]) && stristr($keyArr[$key], $searchString)
                                        || $this->searchKeysToo && stristr($key, $searchString)
                                ) {
                                        $this->searchKeys[$depth] = 1;
index 8e0eb93..8f9c666 100644 (file)
@@ -52,7 +52,7 @@
                                <source>Search</source>
                        </trans-unit>
                        <trans-unit id="useRegExp" xml:space="preserve">
-                               <source>Use regular expression</source>
+                               <source>Use regular expression (phrase is surrounded by slashes automatically)</source>
                        </trans-unit>
                        <trans-unit id="writeValue" xml:space="preserve">
                                <source>Write value to configuration file</source>