[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaObject: ignore deleted vars for getVars

git at icinga.org git at icinga.org
Tue Feb 23 03:15:20 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: 070d05d4a8ec2fe91bac884844f488e28fcb540b
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=070d05d4a8ec2fe91bac884844f488e28fcb540b

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Feb 22 15:43:59 2016 +0100

IcingaObject: ignore deleted vars for getVars

This is used when resolving plain objects

---

 library/Director/Objects/IcingaObject.php |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php
index d201dc8..8e27e1e 100644
--- a/library/Director/Objects/IcingaObject.php
+++ b/library/Director/Objects/IcingaObject.php
@@ -401,6 +401,10 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
     {
         $vars = (object) array();
         foreach ($this->vars() as $key => $var) {
+            if ($var->hasBeenDeleted()) {
+                continue;
+            }
+
             $vars->$key = $var->getValue();
         }
 



More information about the icinga-checkins mailing list