diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-02-24 18:08:57 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-02-24 18:08:57 +0000 |
commit | 78dd50201ba7275cb357d8bddc89adb66363d98e (patch) | |
tree | d9ce58991ffad778240498a53c171770f5d0e6ae /etc/inc/xmlparse.inc | |
parent | a1003d57046a138f1ec45f1a7e4af2804f72f50a (diff) | |
download | pfsense-78dd50201ba7275cb357d8bddc89adb66363d98e.zip pfsense-78dd50201ba7275cb357d8bddc89adb66363d98e.tar.gz |
Prevent empty tags of creating <tag></tag> entries but instead just create them as <tag/> to be consistent. This fixes some empty arrays problems on the code.
Diffstat (limited to 'etc/inc/xmlparse.inc')
-rw-r--r-- | etc/inc/xmlparse.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/xmlparse.inc b/etc/inc/xmlparse.inc index cb55117..9471994 100644 --- a/etc/inc/xmlparse.inc +++ b/etc/inc/xmlparse.inc @@ -215,6 +215,10 @@ function dump_xml_config_sub($arr, $indent) { } } } + } else if (empty($val)) { + $xmlconfig .= str_repeat("\t", $indent); + $xmlconfig .= "<$ent/>\n"; + $xmlconfig .= str_repeat("\t", $indent); } else { /* it's an array */ $xmlconfig .= str_repeat("\t", $indent); |