[icinga-checkins] icinga.org: icingaweb2-module-director/feature/nested-apply-rules-12033: IcingaMultiEditForm: translate '' to null

git at icinga.org git at icinga.org
Fri Oct 21 10:08:07 CEST 2016


Module: icingaweb2-module-director
Branch: feature/nested-apply-rules-12033
Commit: a8c37695a9c12bf13ee203a6e8f9e83fa487e11e
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=a8c37695a9c12bf13ee203a6e8f9e83fa487e11e

Author: Thomas Gelf <thomas at gelf.net>
Date:   Fri Oct 14 20:13:35 2016 +0000

IcingaMultiEditForm: translate '' to null

---

 application/forms/IcingaMultiEditForm.php |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/application/forms/IcingaMultiEditForm.php b/application/forms/IcingaMultiEditForm.php
index e45e6dd..a767bd3 100644
--- a/application/forms/IcingaMultiEditForm.php
+++ b/application/forms/IcingaMultiEditForm.php
@@ -99,6 +99,10 @@ class IcingaMultiEditForm extends DirectorObjectForm
         $valueSum = array_pop($parts);
         $property = implode('_', $parts);
 
+        if ($value === '') {
+            $value = null;
+        }
+
         $found = false;
         foreach ($this->getVariants($property) as $json => $objects) {
             if ($valueSum !== sha1($json)) {



More information about the icinga-checkins mailing list