summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-09-09 21:23:52 +0000
committerErmal Luçi <eri@pfsense.org>2008-09-09 21:23:52 +0000
commitb9ed163dc5aeab0acedc038f6ebc8bfcd7a7dcdf (patch)
treed2367ca6991dfa101d3fc313439cd96b5fbcbdc7
parent89019922fa6033635187452f322a95e16866ae53 (diff)
downloadpfsense-b9ed163dc5aeab0acedc038f6ebc8bfcd7a7dcdf.zip
pfsense-b9ed163dc5aeab0acedc038f6ebc8bfcd7a7dcdf.tar.gz
Array checks too.
-rwxr-xr-xusr/local/www/diag_dhcp_leases.php3
-rwxr-xr-xusr/local/www/services_dhcp_relay.php6
2 files changed, 6 insertions, 3 deletions
diff --git a/usr/local/www/diag_dhcp_leases.php b/usr/local/www/diag_dhcp_leases.php
index a6bbd45..5f13a2b 100755
--- a/usr/local/www/diag_dhcp_leases.php
+++ b/usr/local/www/diag_dhcp_leases.php
@@ -214,7 +214,8 @@ if(count($pools) > 0) {
}
foreach($config['interfaces'] as $ifname => $ifarr) {
- if (is_array($config['dhcpd'][$ifname]['staticmap'])) {
+ if (is_array($config['dhcpd'][$ifname]) &&
+ is_array($config['dhcpd'][$ifname]['staticmap'])) {
foreach($config['dhcpd'][$ifname]['staticmap'] as $static) {
$slease = array();
$slease['ip'] = $static['ipaddr'];
diff --git a/usr/local/www/services_dhcp_relay.php b/usr/local/www/services_dhcp_relay.php
index e4126c7..1517be2 100755
--- a/usr/local/www/services_dhcp_relay.php
+++ b/usr/local/www/services_dhcp_relay.php
@@ -88,8 +88,10 @@ $ifcfg = $config['interfaces'][$if];
* the two are not compatible with each other.
*/
$dhcpd_enabled = false;
-foreach($config['dhcpd'] as $dhcp) {
- if(isset($dhcp['enable'])) $dhcpd_enabled = true;
+if (is_array($config['dhcpd'])) {
+ foreach($config['dhcpd'] as $dhcp)
+ if(isset($dhcp['enable']))
+ $dhcpd_enabled = true;
}
if ($_POST) {
OpenPOWER on IntegriCloud