From 2eb874964b571474df5519d54f4c62d3cbb32f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20S=C5=82omka?= Date: Wed, 6 Sep 2023 10:10:47 +0200 Subject: [PATCH] Fixed issue with ovewriting array key --- src/lib/Repository/EventSubscriber/NameSchemaSubscriber.php | 2 +- src/lib/Repository/Helper/NameSchemaService.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/Repository/EventSubscriber/NameSchemaSubscriber.php b/src/lib/Repository/EventSubscriber/NameSchemaSubscriber.php index 777a690f5f..375e027b3c 100644 --- a/src/lib/Repository/EventSubscriber/NameSchemaSubscriber.php +++ b/src/lib/Repository/EventSubscriber/NameSchemaSubscriber.php @@ -117,7 +117,7 @@ private function processEvent( ?array $fieldMap = null ): array { foreach ($languages as $languageCode) { - $tokenValues[$languageCode] = []; + $tokenValues[$languageCode] ?? $tokenValues[$languageCode] = []; foreach ($identifiers as $identifier) { $fieldDefinition = $contentType->getFieldDefinition($identifier); if (null === $fieldDefinition) { diff --git a/src/lib/Repository/Helper/NameSchemaService.php b/src/lib/Repository/Helper/NameSchemaService.php index b39150a28b..4490ca32a9 100644 --- a/src/lib/Repository/Helper/NameSchemaService.php +++ b/src/lib/Repository/Helper/NameSchemaService.php @@ -4,7 +4,6 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ - namespace Ibexa\Core\Repository\Helper; use Ibexa\Contracts\Core\Persistence\Content\Type as SPIContentType;