Initialize DHCP settings in setup wizard. Fixes #8889

Rather than assume they are present, create the arrays before use.
This commit is contained in:
jim-p 2018-09-12 15:46:57 -04:00
parent d9064f0b92
commit 7c15c19d76

View File

@ -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']}")) {