Boolean: form sends '' for null value
This commit is contained in:
parent
44e2c73f79
commit
0ce8a29b52
|
@ -33,6 +33,7 @@ class Boolean extends ZfSelect
|
|||
return $value === 'y'
|
||||
|| $value === 'n'
|
||||
|| $value === null
|
||||
|| $value === ''
|
||||
|| $value === true
|
||||
|| $value === false;
|
||||
}
|
||||
|
@ -43,6 +44,8 @@ class Boolean extends ZfSelect
|
|||
$value = 'y';
|
||||
} elseif ($value === false) {
|
||||
$value = 'n';
|
||||
} elseif ($value === '') {
|
||||
$value = null;
|
||||
}
|
||||
|
||||
return parent::setValue($value);
|
||||
|
|
Loading…
Reference in New Issue