summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjim-p <jimp@netgate.com>2018-12-05 11:19:24 -0500
committerjim-p <jimp@netgate.com>2018-12-05 11:19:52 -0500
commit806cf0618fa108bf7fa4a4fb09fe7e07c3b05177 (patch)
treec31ce2aa58e9f2b52ce530c570414bd9531ba1e8 /src
parentb9687e73614c681c562ab89a368a17eb27f2df62 (diff)
downloadpfsense-806cf0618fa108bf7fa4a4fb09fe7e07c3b05177.zip
pfsense-806cf0618fa108bf7fa4a4fb09fe7e07c3b05177.tar.gz
Fix array init in setup_wizard.xml. Fixes #9170
(cherry picked from commit f5f79fcc24241f0a76f6a7fe9b32917bee64e393)
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/wizards/setup_wizard.xml15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/usr/local/www/wizards/setup_wizard.xml b/src/usr/local/www/wizards/setup_wizard.xml
index 35486a0..546f6eb 100644
--- a/src/usr/local/www/wizards/setup_wizard.xml
+++ b/src/usr/local/www/wizards/setup_wizard.xml
@@ -130,8 +130,7 @@
</fields>
<stepbeforeformdisplay>
<![CDATA[
- $config['wizardtemp'] = array();
- $config['wizardtemp']['system'] = array();
+ init_config_arr(array('wizardtemp', 'system'));
$config['wizardtemp']['system']['hostname'] = $config['system']['hostname'];
$config['wizardtemp']['system']['domain'] = $config['system']['domain'];
]]>
@@ -534,14 +533,7 @@
}
$type = $_POST['selectedtype'];
- if (!is_array($config['ppps'])) {
- $config['ppps'] = array();
- }
-
- if (!is_array($config['ppps']['ppp'])) {
- $config['ppps']['ppp'] = array();
- }
-
+ init_config_arr(array('ppps', 'ppp'));
if (count($config['ppps']['ppp'])) {
foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
if ($ppp['ptpid'] == "0") {
@@ -765,8 +757,7 @@
$config['system']['hostname'] = $config['wizardtemp']['system']['hostname'];
$config['system']['domain'] = $config['wizardtemp']['system']['domain'];
if (!empty($config['wizardtemp']['wangateway'])) {
- if (!is_array($config['gateways']['gateway_item']))
- $config['gateways']['gateway_item'] = array();
+ init_config_arr(array('gateways', 'gateway_item'));
$found = false;
$defaultgw_found = false;
foreach ($config['gateways']['gateway_item'] as & $gw) {
OpenPOWER on IntegriCloud