diff --git a/src/Celsius3/CoreBundle/Form/EventListener/AddCustomFieldsSubscriber.php b/src/Celsius3/CoreBundle/Form/EventListener/AddCustomFieldsSubscriber.php index a0bb87ca3..85670a196 100644 --- a/src/Celsius3/CoreBundle/Form/EventListener/AddCustomFieldsSubscriber.php +++ b/src/Celsius3/CoreBundle/Form/EventListener/AddCustomFieldsSubscriber.php @@ -102,7 +102,7 @@ public function postSetData(FormEvent $event): void } if (ChoiceType::class === $field->getType()) { - $values = explode(',', $field->getValue()); + $values = $field->getValue() ? explode(',', $field->getValue()) : []; $array_choices = ['' => '']; foreach ($values as $key => $val) { $array_choices[$val] = $val;