Project

General

Profile

Actions

Bug #60851

closed

System>Configuration module produces a bug while searching in

Added by Regis TEDONE over 9 years ago. Updated over 5 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.

Actions #1

Updated by Guillaume Crico about 9 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;
                }
            }
Actions #2

Updated by Markus Klein about 9 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 
Actions #3

Updated by Markus Klein about 9 years ago

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

Actions #4

Updated by Gerrit Code Review about 9 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

Actions #5

Updated by Gerrit Code Review about 9 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

Actions #6

Updated by Gerrit Code Review about 9 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

Actions #7

Updated by Gerrit Code Review about 9 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

Actions #8

Updated by Gerrit Code Review about 9 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

Actions #9

Updated by Gerrit Code Review about 9 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

Actions #10

Updated by Gerrit Code Review about 9 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

Actions #11

Updated by Gerrit Code Review about 9 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

Actions #12

Updated by Gerrit Code Review about 9 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

Actions #13

Updated by Gerrit Code Review about 9 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

Actions #14

Updated by Michael Oehlhof about 9 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF