8000 bug #9711 [FrameworkBundle] Allowed "0" as a checkbox value in php te… · symfony/symfony@0ecd186 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ecd186

Browse files
committed
bug #9711 [FrameworkBundle] Allowed "0" as a checkbox value in php templates (jakzal)
This PR was merged into the 2.3 branch. Discussion ---------- [FrameworkBundle] Allowed "0" as a checkbox value in php templates | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #8251 | License | MIT | Doc PR | Commits ------- 955e8cf [FrameworkBundle] Allowed "0" as a checkbox value in the php template.
2 parents 0c71cfa + 955e8cf commit 0ecd186

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<input type="checkbox"
22
<?php echo 4E68 $view['form']->block($form, 'widget_attributes') ?>
3-
<?php if ($value): ?> value="<?php echo $view->escape($value) ?>"<?php endif ?>
3+
<?php if (strlen($value) > 0): ?> value="<?php echo $view->escape($value) ?>"<?php endif ?>
44
<?php if ($checked): ?> checked="checked"<?php endif ?>
55
/>

0 commit comments

Comments
 (0)
0