diff --git a/src/lib/UniversalDiscovery/Event/Subscriber/ContentCreate.php b/src/lib/UniversalDiscovery/Event/Subscriber/ContentCreate.php index 54a325fe90..47ad7b327b 100644 --- a/src/lib/UniversalDiscovery/Event/Subscriber/ContentCreate.php +++ b/src/lib/UniversalDiscovery/Event/Subscriber/ContentCreate.php @@ -98,9 +98,9 @@ private function getRestrictedContentTypesIdentifiers($hasAccess): array $restrictedContentTypes = $this->contentTypeService->loadContentTypeList($restrictedContentTypesIds); - return array_map(function (ContentType $contentType): string { + return array_values(array_map(function (ContentType $contentType): string { return $contentType->identifier; - }, (array)$restrictedContentTypes); + }, (array)$restrictedContentTypes)); } /**