From 4adabf7c1206664203670eff039679eaf77b7201 Mon Sep 17 00:00:00 2001 From: Georg Ringer <georg.ringer@gmail.com> Date: Thu, 21 Sep 2023 21:55:20 +0200 Subject: [PATCH] [BUGFIX] Cast to string before using GU:trimExplode in indexed_search As the keyword field can be null, the value must be cast to a string. Resolves: #102002 Releases: main, 12.4, 11.5 Change-Id: Ic2e437c489c699833c2d51301bdff715f613ea6e Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81165 Tested-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Classes/Controller/AdministrationController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php b/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php index ce3cd60574d1..9e11b037aeae 100644 --- a/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php +++ b/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php @@ -267,7 +267,7 @@ class AdministrationController extends ActionController unset($debugInfo['lexer']); } $pageRecord = BackendUtility::getRecord('pages', $pageHashRow['data_page_id']); - $keywords = is_array($pageRecord) ? array_flip(GeneralUtility::trimExplode(',', $pageRecord['keywords'], true)) : []; + $keywords = is_array($pageRecord) ? array_flip(GeneralUtility::trimExplode(',', (string)$pageRecord['keywords'], true)) : []; $queryBuilder = $this->connectionPool->getQueryBuilderForTable('index_words'); $wordRecords = $queryBuilder -- GitLab