[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaObjectFieldLoader: silently ignore setValues

git at icinga.org git at icinga.org
Tue Oct 18 04:06:28 CEST 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Oct 17 16:57:25 2016 +0000

IcingaObjectFieldLoader: silently ignore setValues

...when called for an object without custom var support

---

 library/Director/Web/Form/IcingaObjectFieldLoader.php |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/library/Director/Web/Form/IcingaObjectFieldLoader.php b/library/Director/Web/Form/IcingaObjectFieldLoader.php
index 640c241..eaad9a7 100644
--- a/library/Director/Web/Form/IcingaObjectFieldLoader.php
+++ b/library/Director/Web/Form/IcingaObjectFieldLoader.php
@@ -45,6 +45,10 @@ class IcingaObjectFieldLoader
      */
     public function setValues($values, $prefix = null)
     {
+        if (! $this->object->supportsCustomVars()) {
+            return $this;
+        }
+
         if ($prefix !== null) {
             $len = strlen($prefix);
         }



More information about the icinga-checkins mailing list