DirectorObjectForm: skip empty related sets...

...provides as objects

fixes #13605
This commit is contained in:
Thomas Gelf 2016-12-15 11:44:52 +01:00
parent 65181ca67e
commit 3d8ccf2448
1 changed files with 8 additions and 0 deletions

View File

@ -664,6 +664,14 @@ abstract class DirectorObjectForm extends QuickForm
$key = $element->getName();
if ($object->hasProperty($key)) {
$value = $object->get($key);
if ($object instanceof IcingaObject) {
if ($object->propertyIsRelatedSet($key)) {
if (! count((array) $value)) {
continue;
}
}
}
if ($value !== null) {
$element->setValue($value);
}