summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-08-30 14:42:09 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-08-30 14:42:18 -0400
commit2c7497cb68acefa086f5f29ec5cdc0b565562966 (patch)
tree97c7aa418fe3d603bcc765a45e4bcd6d26f3577a /usr/local/www/services_dhcp.php
parent9edb9d74465740e90dfc636ba7221f5109fbcbec (diff)
downloadpfsense-2c7497cb68acefa086f5f29ec5cdc0b565562966.zip
pfsense-2c7497cb68acefa086f5f29ec5cdc0b565562966.tar.gz
Avoid the error: Warning: Invalid argument supplied for foreach() in /usr/local/www/services_dhcp.php on line 256
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-xusr/local/www/services_dhcp.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 086e38d..152877d 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -253,9 +253,10 @@ if ($_POST) {
}
$noip = false;
- foreach ($a_maps as $map)
- if (empty($map['ipaddr']))
- $noip = true;
+ if(is_array($a_maps))
+ foreach ($a_maps as $map)
+ if (empty($map['ipaddr']))
+ $noip = true;
if ($_POST['staticarp'] && $noip)
$input_errors[] = "Cannot enable static ARP when you have static map entries without IP addresses. Ensure all static maps have IP addresses and try again.";
OpenPOWER on IntegriCloud