diff --git a/typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php b/typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php index bf2b22884609b549b3fa7867c278069133abcf88..705094322bc112f11f820946c5cad116e38bcf92 100644 --- a/typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php +++ b/typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php @@ -176,7 +176,7 @@ abstract class AbstractConfigurationManager implements SingletonInterface if (!empty($frameworkConfiguration['persistence']['recursive'])) { $storagePids = $this->getRecursiveStoragePids( - GeneralUtility::intExplode(',', $frameworkConfiguration['persistence']['storagePid']), + GeneralUtility::intExplode(',', (string)($frameworkConfiguration['persistence']['storagePid'] ?? '')), (int)$frameworkConfiguration['persistence']['recursive'] ); $frameworkConfiguration['persistence']['storagePid'] = implode(',', $storagePids); diff --git a/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php b/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php index 568027565257c448e0236048d0b9a5289d9b4dc3..eb8675a23a0b390738d81cc43dc03374dbb6d1f6 100644 --- a/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php +++ b/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php @@ -121,8 +121,8 @@ class FrontendConfigurationManager extends AbstractConfigurationManager */ protected function overrideStoragePidIfStartingPointIsSet(array $frameworkConfiguration): array { - $pages = $this->contentObject->data['pages'] ?? ''; - if (is_string($pages) && $pages !== '') { + $pages = (string)($this->contentObject->data['pages'] ?? ''); + if ($pages !== '') { $storagePids = GeneralUtility::intExplode(',', $pages, true); $recursionDepth = (int)($this->contentObject->data['recursive'] ?? 0); $recursiveStoragePids = $this->pageRepository->getPageIdsRecursive($storagePids, $recursionDepth); diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php b/typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php index f2d8974cc43c349231c4337692aee1567051deb6..f17fd6605260b34e50f19c750b459facc3d9f668 100644 --- a/typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php +++ b/typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php @@ -936,7 +936,7 @@ class Backend implements BackendInterface, SingletonInterface return (int)$frameworkConfiguration['persistence']['classes'][$className]['newRecordStoragePid']; } } - $storagePidList = GeneralUtility::intExplode(',', $frameworkConfiguration['persistence']['storagePid']); + $storagePidList = GeneralUtility::intExplode(',', (string)($frameworkConfiguration['persistence']['storagePid'] ?? '')); return (int)$storagePidList[0]; } diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php b/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php index d4d045b4ba99bf17262fefded8239922b0e2ba72..10e1e2b057f120a15805d9d1a9d30564d104fba4 100644 --- a/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php +++ b/typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php @@ -484,7 +484,8 @@ class DataMapper ); } } else { - $constraint = $query->in('uid', GeneralUtility::intExplode(',', $fieldValue)); + // Note: $fieldValue is annotated as a string, but this cannot be trusted as the callers do not ensure this. + $constraint = $query->in('uid', GeneralUtility::intExplode(',', (string)$fieldValue)); } if (!empty($relationTableMatchFields)) { foreach ($relationTableMatchFields as $relationTableMatchFieldName => $relationTableMatchFieldValue) { diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/QueryFactory.php b/typo3/sysext/extbase/Classes/Persistence/Generic/QueryFactory.php index 336ae706b2e08f2c20c1212f32bae2a3b26f46a7..b9210c04c0525646a60c37012929e8effbe50b4f 100644 --- a/typo3/sysext/extbase/Classes/Persistence/Generic/QueryFactory.php +++ b/typo3/sysext/extbase/Classes/Persistence/Generic/QueryFactory.php @@ -61,7 +61,7 @@ class QueryFactory implements QueryFactoryInterface, SingletonInterface } $frameworkConfiguration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK); - $querySettings->setStoragePageIds(GeneralUtility::intExplode(',', $frameworkConfiguration['persistence']['storagePid'] ?? '')); + $querySettings->setStoragePageIds(GeneralUtility::intExplode(',', (string)($frameworkConfiguration['persistence']['storagePid'] ?? ''))); $query->setQuerySettings($querySettings); return $query; }