diff --git a/src/Field/Configurator/ChoiceConfigurator.php b/src/Field/Configurator/ChoiceConfigurator.php index a1b30a52a5..0183d2c894 100644 --- a/src/Field/Configurator/ChoiceConfigurator.php +++ b/src/Field/Configurator/ChoiceConfigurator.php @@ -65,7 +65,7 @@ public function configure(FieldDto $field, EntityDto $entityDto, AdminContext $c $areChoicesTranslatable = $choicesSupportTranslatableInterface = true; } - if ($allChoicesAreEnums && array_is_list($choices)) { + if ($allChoicesAreEnums && array_is_list($choices) && \count($choices) > 0) { $processedEnumChoices = []; foreach ($choices as $choice) { $processedEnumChoices[$choice->name] = $choice;