allow 0 or blank string in inputs

This commit is contained in:
Evan Prodromou 2010-04-26 02:36:46 -04:00
parent 1e21af42a6
commit 767ff2f7ec

View File

@ -176,7 +176,7 @@ class HTMLOutputter extends XMLOutputter
$attrs = array('name' => $id, $attrs = array('name' => $id,
'type' => 'text', 'type' => 'text',
'id' => $id); 'id' => $id);
if ($value) { if (!is_null($value)) { // value can be 0 or ''
$attrs['value'] = $value; $attrs['value'] = $value;
} }
$this->element('input', $attrs); $this->element('input', $attrs);