Bug #60851

System>Configuration module produces a bug while searching in

Added by Regis TEDONE about 7 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2014-08-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

TYPO3 6.2.4 / PHP Version 5.3.28-1 / Debian Weezy

Module System > Configuration
When searching anything in $BE_USER->uc, an error occurs :

#1: PHP Warning: stristr() expects parameter 1 to be string, object given in /var/www/clients/client3/web88/typo3_src/typo3_src-6.2.4/typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php line 195 (More information)

TYPO3\CMS\Core\Error\Exception thrown in file
/var/www/clients/client3/web88/typo3_src/typo3_src-6.2.4/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 101.

#1

Updated by Guillaume Crico over 6 years ago

This happens when some configuration values are objects.
By example, a Closure for a hook...

The PHP warning is also issued if the search is done with regexMode on.

In "typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php":

            if ($this->regexMode) {
                if (
                    preg_match('/' . $searchString . '/', $keyArr[$key])
                    || $this->searchKeysToo && preg_match('/' . $searchString . '/', $key)
                ) {
                    $this->searchKeys[$depth] = 1;
                }
            } else {
                if (
                    !$deeper && stristr($keyArr[$key], $searchString)
                    || $this->searchKeysToo && stristr($key, $searchString)
                ) {
                    $this->searchKeys[$depth] = 1;
                }
            }

... should be replaced by:

            if ($this->regexMode) {
                if (
                    is_scalar($keyArr[$key]) && preg_match('/' . $searchString . '/', $keyArr[$key])
                    || $this->searchKeysToo && preg_match('/' . $searchString . '/', $key)
                ) {
                    $this->searchKeys[$depth] = 1;
                }
            } else {
                if (
                    is_scalar($keyArr[$key]) && stristr($keyArr[$key], $searchString)
                    || $this->searchKeysToo && stristr($key, $searchString)
                ) {
                    $this->searchKeys[$depth] = 1;
                }
            }
#2

Updated by Markus Klein over 6 years ago

  • Status changed from New to Accepted
  • Priority changed from Could have to Should have
  • Target version set to next-patchlevel

Regexp search is broken too

#1: PHP Warning: preg_match() expects parameter 2 to be string, array given in typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php line 207 
#3

Updated by Markus Klein over 6 years ago

Can anyone of you please push a patch to our review system?

#4

Updated by Gerrit Code Review over 6 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38327

#5

Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38327

#6

Updated by Gerrit Code Review over 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38327

#7

Updated by Gerrit Code Review over 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38327

#8

Updated by Gerrit Code Review over 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38327

#9

Updated by Gerrit Code Review over 6 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38327

#10

Updated by Gerrit Code Review over 6 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38327

#11

Updated by Gerrit Code Review over 6 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38349

#12

Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38349

#13

Updated by Gerrit Code Review over 6 years ago

Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38349

#14

Updated by Michael Oehlhof over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#15

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF