diff --git a/src/usr/local/www/wizards/setup_wizard.xml b/src/usr/local/www/wizards/setup_wizard.xml index 35486a01d6..546f6ebe85 100644 --- a/src/usr/local/www/wizards/setup_wizard.xml +++ b/src/usr/local/www/wizards/setup_wizard.xml @@ -130,8 +130,7 @@ @@ -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) {