Skip to content
Snippets Groups Projects
Commit 8255076e authored by Georg Ringer's avatar Georg Ringer Committed by Benni Mack
Browse files

[BUGFIX] Force typecast to string in ArrayBrowser

Make sure that the key in ArrayBrowser::getSearchKeys() is always cast
to string.

Resolves: #91007
Releases: master
Change-Id: I28aa780a92f9425df486cb0dadee3930b4a54f14
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64124


Tested-by: default avatarChristian Eßl <indy.essl@gmail.com>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarJonas Eberle <flightvision@googlemail.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarChristian Eßl <indy.essl@gmail.com>
Reviewed-by: default avatarJonas Eberle <flightvision@googlemail.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 6cc540e1
No related merge requests found
......@@ -150,15 +150,15 @@ class ArrayBrowser
$deeper = is_array($keyArr[$key]);
if ($this->regexMode) {
if (
is_scalar($keyArr[$key]) && preg_match('/' . $searchString . '/', $keyArr[$key])
|| $this->searchKeysToo && preg_match('/' . $searchString . '/', $key)
is_scalar($keyArr[$key]) && preg_match('/' . $searchString . '/', (string)$keyArr[$key])
|| $this->searchKeysToo && preg_match('/' . $searchString . '/', (string)$key)
) {
$this->searchKeys[$depth] = 1;
}
} else {
if (
is_scalar($keyArr[$key]) && stripos($keyArr[$key], $searchString) !== false
|| $this->searchKeysToo && stripos($key, $searchString) !== false
is_scalar($keyArr[$key]) && stripos((string)$keyArr[$key], $searchString) !== false
|| $this->searchKeysToo && stripos((string)$key, $searchString) !== false
) {
$this->searchKeys[$depth] = 1;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment