Skip to content

Commit bb54e8b

Browse files
committed
Don't check the checkbox if the value is '0' or 0.
1 parent 9c652bf commit bb54e8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/widget/sfWidgetFormInputCheckbox.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function configure($options = array(), $attributes = array())
6969
*/
7070
public function render($name, $value = null, $attributes = array(), $errors = array())
7171
{
72-
if (null !== $value && $value !== false)
72+
if (null !== $value && $value !== false && $value !== '0' && $value !== 0)
7373
{
7474
$attributes['checked'] = 'checked';
7575
}

0 commit comments

Comments
 (0)