Boolean: form sends '' for null value

This commit is contained in:
Thomas Gelf 2016-05-24 19:59:02 +02:00
parent 44e2c73f79
commit 0ce8a29b52
1 changed files with 3 additions and 0 deletions

View File

@ -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);