summaryrefslogtreecommitdiffstats
path: root/etc/inc/xmlparse.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-09-09 14:40:09 +0000
committerErmal Luçi <eri@pfsense.org>2009-09-09 14:41:07 +0000
commit0eb230cb2e47943530f607a442bbaf1c26f03e03 (patch)
tree6e4889bf715570218a38421bea6c8a923bf3903d /etc/inc/xmlparse.inc
parentb86457b647b16c91cc54e4b07d35946f9c119be3 (diff)
downloadpfsense-0eb230cb2e47943530f607a442bbaf1c26f03e03.zip
pfsense-0eb230cb2e47943530f607a442bbaf1c26f03e03.tar.gz
If it is supposed to be an array then make sure it has the array type. This fixes wireless configuration problems at least.
Diffstat (limited to 'etc/inc/xmlparse.inc')
-rw-r--r--etc/inc/xmlparse.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/xmlparse.inc b/etc/inc/xmlparse.inc
index 78178b8..3859222 100644
--- a/etc/inc/xmlparse.inc
+++ b/etc/inc/xmlparse.inc
@@ -75,8 +75,11 @@ function add_elements(&$cfgarray, &$parser) {
} else {
if (isset($listtags[$parser->name]))
add_elements($cfgarray[$parser->name][], $parser);
- else
+ else {
add_elements($cfgarray[$parser->name], $parser);
+ if (!isset($cfgarray[$parser->name]))
+ $cfgarray[$parser->name] = array();
+ }
}
break;
case XMLReader::TEXT:
OpenPOWER on IntegriCloud