[icinga-checkins] icinga.org: icingaweb2/bugfix/ ini-writer-must-not-persist-section-keys-with-a-null-value-11743: Remove obsolete workarounds

git at icinga.org git at icinga.org
Mon Oct 17 15:02:03 CEST 2016


Module: icingaweb2
Branch: bugfix/ini-writer-must-not-persist-section-keys-with-a-null-value-11743
Commit: e2f6c81bfa41fe78cd9c3f8db3aeb09cfb2cc0d1
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=e2f6c81bfa41fe78cd9c3f8db3aeb09cfb2cc0d1

Author: Alexander A. Klimov <alexander.klimov at icinga.com>
Date:   Mon Oct 17 15:00:43 2016 +0200

Remove obsolete workarounds

refs #11743

---

 application/forms/Config/UserBackendConfigForm.php               |    6 ------
 application/forms/Navigation/NavigationConfigForm.php            |    5 -----
 .../monitoring/application/forms/Config/BackendConfigForm.php    |    6 ------
 .../monitoring/application/forms/Config/TransportConfigForm.php  |    6 ------
 4 files changed, 23 deletions(-)

diff --git a/application/forms/Config/UserBackendConfigForm.php b/application/forms/Config/UserBackendConfigForm.php
index 4213138..f7d4d15 100644
--- a/application/forms/Config/UserBackendConfigForm.php
+++ b/application/forms/Config/UserBackendConfigForm.php
@@ -200,12 +200,6 @@ class UserBackendConfigForm extends ConfigForm
         }
 
         $backendConfig->merge($data);
-        foreach ($backendConfig->toArray() as $k => $v) {
-            if ($v === null) {
-                unset($backendConfig->$k);
-            }
-        }
-
         $this->config->setSection($name, $backendConfig);
         return $this;
     }
diff --git a/application/forms/Navigation/NavigationConfigForm.php b/application/forms/Navigation/NavigationConfigForm.php
index 158875c..9bfc3a0 100644
--- a/application/forms/Navigation/NavigationConfigForm.php
+++ b/application/forms/Navigation/NavigationConfigForm.php
@@ -426,11 +426,6 @@ class NavigationConfigForm extends ConfigForm
         }
 
         $itemConfig->merge($data);
-        foreach ($itemConfig->toArray() as $k => $v) {
-            if ($v === null) {
-                unset($itemConfig->$k);
-            }
-        }
 
         if ($shared) {
             // Share all descendant children
diff --git a/modules/monitoring/application/forms/Config/BackendConfigForm.php b/modules/monitoring/application/forms/Config/BackendConfigForm.php
index 78cb049..e7fdba6 100644
--- a/modules/monitoring/application/forms/Config/BackendConfigForm.php
+++ b/modules/monitoring/application/forms/Config/BackendConfigForm.php
@@ -147,12 +147,6 @@ class BackendConfigForm extends ConfigForm
         }
 
         $backendConfig->merge($data);
-        foreach ($backendConfig->toArray() as $k => $v) {
-            if ($v === null) {
-                unset($backendConfig->$k);
-            }
-        }
-
         $this->config->setSection($name, $backendConfig);
         return $this;
     }
diff --git a/modules/monitoring/application/forms/Config/TransportConfigForm.php b/modules/monitoring/application/forms/Config/TransportConfigForm.php
index 0e5ad4f..79ac174 100644
--- a/modules/monitoring/application/forms/Config/TransportConfigForm.php
+++ b/modules/monitoring/application/forms/Config/TransportConfigForm.php
@@ -167,12 +167,6 @@ class TransportConfigForm extends ConfigForm
         }
 
         $transportConfig->merge($data);
-        foreach ($transportConfig->toArray() as $k => $v) {
-            if ($v === null) {
-                unset($transportConfig->$k);
-            }
-        }
-
         $this->config->setSection($name, $transportConfig);
         return $this;
     }



More information about the icinga-checkins mailing list