Skip to content

Commit

Permalink
[BUGFIX] Normalize category storage PID on TYPO3v12
Browse files Browse the repository at this point in the history
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: TYPO3GmbH#301
  • Loading branch information
mbrodala authored May 22, 2024
1 parent ce2dc48 commit 752d8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/Repository/CategoryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 752d8c0

Please sign in to comment.