IcingaObject: ignore deleted vars for getVars

This is used when resolving plain objects
This commit is contained in:
Thomas Gelf 2016-02-22 15:43:59 +01:00
parent 1f869fa001
commit 070d05d4a8
1 changed files with 4 additions and 0 deletions

View File

@ -401,6 +401,10 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
{ {
$vars = (object) array(); $vars = (object) array();
foreach ($this->vars() as $key => $var) { foreach ($this->vars() as $key => $var) {
if ($var->hasBeenDeleted()) {
continue;
}
$vars->$key = $var->getValue(); $vars->$key = $var->getValue();
} }