IcingaObject: better way to get resolved props?

This commit is contained in:
Thomas Gelf 2016-12-16 12:31:34 +01:00
parent 241404d9ba
commit d4736f4a41
1 changed files with 7 additions and 1 deletions

View File

@ -2413,7 +2413,13 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
$props = array();
if ($resolved) {
$p = $this->getResolvedProperties();
$p = $this->getInheritedProperties();
foreach ($this->properties as $k => $v) {
if ($v === null && property_exists($p, $k)) {
continue;
}
$p->$k = $v;
}
} else {
$p = $this->properties;
}