summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/services_dhcp.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index e6c3f68..4ac762a 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -305,13 +305,15 @@ if ($_POST) {
$dynsubnet_start = ip2ulong($_POST['range_from']);
$dynsubnet_end = ip2ulong($_POST['range_to']);
- foreach ($a_maps as $map) {
- if (empty($map['ipaddr']))
- continue;
- if ((ip2ulong($map['ipaddr']) > $dynsubnet_start) &&
- (ip2ulong($map['ipaddr']) < $dynsubnet_end)) {
- $input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings."));
- break;
+ if (is_array($a_maps)) {
+ foreach ($a_maps as $map) {
+ if (empty($map['ipaddr']))
+ continue;
+ if ((ip2ulong($map['ipaddr']) > $dynsubnet_start) &&
+ (ip2ulong($map['ipaddr']) < $dynsubnet_end)) {
+ $input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings."));
+ break;
+ }
}
}
}
OpenPOWER on IntegriCloud