diff --git a/Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php b/Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php index 367ba4da484..2284fbc66f6 100644 --- a/Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php +++ b/Neos.ContentRepositoryRegistry/Classes/ContentRepositoryRegistry.php @@ -211,12 +211,18 @@ private function buildProjectionsFactory(ContentRepositoryId $contentRepositoryI (isset($contentRepositorySettings['projections']) && is_array($contentRepositorySettings['projections'])) || throw InvalidConfigurationException::fromMessage('Content repository "%s" does not have projections configured, or the value is no array.', $contentRepositoryId->value); $projectionsFactory = new ProjectionsAndCatchUpHooksFactory(); foreach ($contentRepositorySettings['projections'] as $projectionName => $projectionOptions) { + if ($projectionOptions === null) { + continue; + } $projectionFactory = $this->objectManager->get($projectionOptions['factoryObjectName']); if (!$projectionFactory instanceof ProjectionFactoryInterface) { throw InvalidConfigurationException::fromMessage('Projection factory object name for projection "%s" (content repository "%s") is not an instance of %s but %s.', $projectionName, $contentRepositoryId->value, ProjectionFactoryInterface::class, get_debug_type($projectionFactory)); } $projectionsFactory->registerFactory($projectionFactory, $projectionOptions['options'] ?? []); foreach (($projectionOptions['catchUpHooks'] ?? []) as $catchUpHookOptions) { + if ($catchUpHookOptions === null) { + continue; + } $catchUpHookFactory = $this->objectManager->get($catchUpHookOptions['factoryObjectName']); if (!$catchUpHookFactory instanceof CatchUpHookFactoryInterface) { throw InvalidConfigurationException::fromMessage('CatchUpHook factory object name for projection "%s" (content repository "%s") is not an instance of %s but %s', $projectionName, $contentRepositoryId->value, CatchUpHookFactoryInterface::class, get_debug_type($catchUpHookFactory)); diff --git a/Neos.ContentRepositoryRegistry/Classes/Exception/InvalidConfigurationException.php b/Neos.ContentRepositoryRegistry/Classes/Exception/InvalidConfigurationException.php index 6077daabacd..fe0f9bd12a3 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Exception/InvalidConfigurationException.php +++ b/Neos.ContentRepositoryRegistry/Classes/Exception/InvalidConfigurationException.php @@ -1,13 +1,10 @@ value), 1650557150);