mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
ExtensibleSet: silently ignore null or empty strings
This commit is contained in:
parent
3134630f86
commit
c4d69e1a88
@ -472,6 +472,11 @@ class ExtensibleSet
|
|||||||
protected function addValuesTo(&$array, $values)
|
protected function addValuesTo(&$array, $values)
|
||||||
{
|
{
|
||||||
foreach ($this->wantArray($values) as $value) {
|
foreach ($this->wantArray($values) as $value) {
|
||||||
|
// silently ignore null or empty strings
|
||||||
|
if (strlen($value) === 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$this->addTo($array, $value);
|
$this->addTo($array, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user