ExtensibleSet: respect strings when filtering
This commit is contained in:
parent
eb52918711
commit
dca6cc8a01
|
@ -32,9 +32,12 @@ class ExtensibleSet extends FormElement
|
|||
|
||||
protected function _filterValue(&$value, &$key)
|
||||
{
|
||||
if ($value !== null) {
|
||||
if (is_array($value)) {
|
||||
$value = array_filter($value, 'strlen');
|
||||
} elseif (is_string($value) && !strlen($value)) {
|
||||
$value = null;
|
||||
}
|
||||
|
||||
return parent::_filterValue($value, $key);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue