summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@scott-ullrichs-mac-pro.local>2009-01-29 13:19:01 -0500
committerScott Ullrich <sullrich@scott-ullrichs-mac-pro.local>2009-01-29 13:19:01 -0500
commit8fc66a00846538542ee808ba3f2715a17069d2c2 (patch)
treeafa1d67933ba09b54761b7f61686be5bbfbcff30 /etc
parent1b71134e55413eb9a2bad0d071e3ab6172ed0171 (diff)
downloadpfsense-8fc66a00846538542ee808ba3f2715a17069d2c2.zip
pfsense-8fc66a00846538542ee808ba3f2715a17069d2c2.tar.gz
Fix foreach error when dhcp settings do not exis on status -> services
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 2794543..6a27b46 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3419,11 +3419,13 @@ function is_dhcp_server_enabled() {
global $config, $g;
$dhcpdcfg = $config['dhcpd'];
$dhcpdenable = false;
- foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) {
- if (isset ($dhcpifconf['enable']) && (($dhcpif == "lan") || (isset ($config['interfaces'][$dhcpif]['enable']) && $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
- $dhcpdenable = true;
- if (isset ($dhcpifconf['enable']) && (($dhcpif == "wan") || (isset ($config['interfaces'][$dhcpif]['enable']) && $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
- $dhcpdenable = true;
+ if($config['dhcpd']) {
+ foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) {
+ if (isset ($dhcpifconf['enable']) && (($dhcpif == "lan") || (isset ($config['interfaces'][$dhcpif]['enable']) && $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
+ $dhcpdenable = true;
+ if (isset ($dhcpifconf['enable']) && (($dhcpif == "wan") || (isset ($config['interfaces'][$dhcpif]['enable']) && $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge']))))
+ $dhcpdenable = true;
+ }
}
return $dhcpdenable;
}
@@ -3833,4 +3835,4 @@ function is_fqdn($fqdn) {
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud