From 81bf3210ea2ebb6b58a88b9ef59e6cfc9104793d Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 18 Mar 2015 20:20:45 +0100 Subject: [PATCH] skip xml tags on false booleans in Config->fromArray() --- src/opnsense/mvc/app/library/OPNsense/Core/Config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php index cff2339d0..7a51f7a08 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php +++ b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php @@ -141,6 +141,10 @@ class Config extends Singleton } foreach ($source as $itemKey => $itemValue) { + if (is_bool($itemValue) && $itemValue == false) { + // skip empty booleans + continue; + } if (is_numeric($itemKey)) { // recurring tag (content), use parent tagname. $childNode = $node->addChild($parentTagName);