diff --git a/src/Form/AccommodationStep2Type.php b/src/Form/AccommodationStep2Type.php index 32ef6f2..ff8665b 100644 --- a/src/Form/AccommodationStep2Type.php +++ b/src/Form/AccommodationStep2Type.php @@ -36,7 +36,7 @@ class AccommodationStep2Type extends AbstractType 'attr' => ['min' => 0], ]) ->add('selectedBoardServiceId', ChoiceType::class, [ - 'label' => false, + 'label' => 'Verpflegungsleistung', 'choices' => $options['board_service_choices'], 'expanded' => true, 'multiple' => false, diff --git a/src/Twig/AppRuntime.php b/src/Twig/AppRuntime.php index c80ff92..9c03b32 100644 --- a/src/Twig/AppRuntime.php +++ b/src/Twig/AppRuntime.php @@ -226,7 +226,8 @@ class AppRuntime implements RuntimeExtensionInterface $labels = array_merge($labels, $this->collectInvalidFieldLabels($child)); } else { // Leaf field, expanded choice, or compound field with own errors - $labels[] = $child->vars['label'] ?? $child->vars['name']; + $label = $child->vars['label'] ?? null; + $labels[] = (\is_string($label) && '' !== $label) ? $label : $child->vars['name']; } } }