summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-11 09:46:44 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-11 09:47:03 +0000
commit7dfa60fa23872c945fdd9eec60c9455fe443ddef (patch)
treedf8365c4d1bbf6b0bcef58c887ac62413fa227ee /usr/local/www/services_dhcp.php
parent507af8dde8f9fe9d0530482398d4b6b91437c4c2 (diff)
downloadpfsense-7dfa60fa23872c945fdd9eec60c9455fe443ddef.zip
pfsense-7dfa60fa23872c945fdd9eec60c9455fe443ddef.tar.gz
Check if item is set before foraching.
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-xusr/local/www/services_dhcp.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 6b238af..93bd5ac 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -229,11 +229,12 @@ if ($_POST) {
$input_errors[] = "You cannot use the broadcast address in the ending subnet range.";
// Disallow a range that includes the virtualip
- foreach($config['virtualip']['vip'] as $vip) {
- if(strtoupper($vip['interface']) == strtoupper($if))
- if($vip['subnet'])
- if(is_inrange($vip['subnet'], $_POST['range_from'], $_POST['range_to']))
+ if (is_array($config['virtualip']['vip'])) {
+ foreach($config['virtualip']['vip'] as $vip) {
+ if(strtoupper($vip['interface']) == strtoupper($if))
+ if($vip['subnet'] && is_inrange($vip['subnet'], $_POST['range_from'], $_POST['range_to']))
$input_errors[] = "The virtual IP address {$vip['subnet']} falls within the subnet range.";
+ }
}
if (!$input_errors) {
OpenPOWER on IntegriCloud