From 752d8c0b62dfeed7484e161bb9f742d9fa7cb569 Mon Sep 17 00:00:00 2001 From: Mathias Brodala Date: Wed, 22 May 2024 11:34:11 +0200 Subject: [PATCH] [BUGFIX] Normalize category storage PID on TYPO3v12 The new TypoScript parser introduced in TYPO3v12 yields a regular integer in case of a single storagePid. Only in case of a CSV this will be a string. This in turn leads to explode() failing with a type error in the integer case. Fix this by normalizing the setting value to string. Fixes: #301 --- Classes/Domain/Repository/CategoryRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Repository/CategoryRepository.php b/Classes/Domain/Repository/CategoryRepository.php index 5c2590c7..2b8292dc 100644 --- a/Classes/Domain/Repository/CategoryRepository.php +++ b/Classes/Domain/Repository/CategoryRepository.php @@ -33,7 +33,7 @@ public function initializeObject(): void GeneralUtility::makeInstance(Context::class), $configurationManager ); - $querySettings->setStoragePageIds(GeneralUtility::intExplode(',', $this->settings['persistence']['storagePid'])); + $querySettings->setStoragePageIds(GeneralUtility::intExplode(',', (string)$this->settings['persistence']['storagePid'])); $this->setDefaultQuerySettings($querySettings); $this->defaultOrderings = [