From 3a6d9a2be6574a014422261ecf574f70720ad95a Mon Sep 17 00:00:00 2001 From: Serhey Dolgushev Date: Wed, 15 Jul 2020 18:10:50 -0400 Subject: [PATCH] EZP-31742: UDW error for users with restricted content types --- src/lib/UniversalDiscovery/Event/Subscriber/ContentCreate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } /**