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
1 changed files with 1 additions and 1 deletions

View File

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