From 9b27a037c1790a6455831556ab5ecdd5c052a465 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/+/81171 Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Tested-by: core-ci <typo3@b13.com> Reviewed-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 3c000e17308d..1066ec722aa2 100644 --- a/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php +++ b/typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php @@ -307,7 +307,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 = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('index_words'); $wordRecords = $queryBuilder -- GitLab