mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 15:54:03 +02:00
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)
|
protected function _filterValue(&$value, &$key)
|
||||||
{
|
{
|
||||||
if ($value !== null) {
|
if (is_array($value)) {
|
||||||
$value = array_filter($value, 'strlen');
|
$value = array_filter($value, 'strlen');
|
||||||
|
} elseif (is_string($value) && !strlen($value)) {
|
||||||
|
$value = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::_filterValue($value, $key);
|
return parent::_filterValue($value, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user