From 7c15c19d76eac725c42133012488cb97e4dcd885 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 12 Sep 2018 15:46:57 -0400 Subject: [PATCH] Initialize DHCP settings in setup wizard. Fixes #8889 Rather than assume they are present, create the arrays before use. --- src/usr/local/www/wizards/setup_wizard.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/usr/local/www/wizards/setup_wizard.xml b/src/usr/local/www/wizards/setup_wizard.xml index 293e8a4284..35486a01d6 100644 --- a/src/usr/local/www/wizards/setup_wizard.xml +++ b/src/usr/local/www/wizards/setup_wizard.xml @@ -669,6 +669,8 @@ If the existing DHCP range on LAN is not in the new subnet or is invalid, then replace the range with a newly crafted one. */ + init_config_arr(array('dhcpd', 'lan', 'range', 'from')); + init_config_arr(array('dhcpd', 'lan', 'range', 'to')); if (!ip_in_subnet($config['dhcpd']['lan']['range']['from'], "{$_POST['lanipaddress']}/{$_POST['subnetmask']}") || !ip_in_subnet($config['dhcpd']['lan']['range']['to'], "{$_POST['lanipaddress']}/{$_POST['subnetmask']}")) {