8000 Applied the suggested improvements. · symfony/symfony@6cc211b · GitHub
[go: up one dir, main page]

Skip to content

Commit 6cc211b

Browse files
committed
Applied the suggested improvements.
1 parent d68c8cd commit 6cc211b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
{%- endif -%}
5858
<select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}>
5959
{%- if empty_value is not none -%}
60-
<option value=""{% if required and value is empty %} selected="selected"{% endif %}>{{ empty_value is empty ? empty_value : empty_value|trans({}, translation_domain) }}</option>
60+
<option value=""{% if required and value is empty %} selected="selected"{% endif %}>{{ empty_value != '' ? empty_value|trans({}, translation_domain) }}</option>
6161
{%- endif -%}
6262
{%- if preferred_choices|length > 0 -%}
6363
{% set options = preferred_choices %}

src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
)) ?>
88
<?php if ($multiple): ?> multiple="multiple"<?php endif ?>
99
>
10-
<?php if (null !== $empty_value): ?><option value=""<?php if ($required and empty($value) && '0' !== $value): ?> selected="selected"<?php endif?>><?php echo empty($empty_value) ? $empty_value : $view->escape($view['translator']->trans($empty_value, array(), $translation_domain)) ?></option><?php endif; ?>
10+
<?php if (null !== $empty_value): ?><option value=""<?php if ($required and empty($value) && '0' !== $value): ?> selected="selected"<?php endif?>><?php echo '' != $empty_value ? $view->escape($view['translator']->trans($empty_value, array(), $translation_domain)) : '' ?></option><?php endif; ?>
1111
<?php if (count($preferred_choices) > 0): ?>
1212
<?php echo $view['form']->block($form, 'choice_widget_options', array('choices' => $preferred_choices)) ?>
1313
<?php if (count($choices) > 0 && null !== $separator): ?>

0 commit comments

Comments
 (0)
0