summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/captiveportal.inc10
-rw-r--r--etc/inc/system.inc2
-rwxr-xr-xusr/local/www/status_rrd_graph.php2
3 files changed, 8 insertions, 6 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index c63e3c9..386a4ce 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -370,10 +370,12 @@ EOD;
else {
/* Deactivate ipfw(4) if not needed */
$cpactive = false;
- foreach ($config['captiveportal'] as $cpkey => $cp) {
- if (isset($cp['enable'])) {
- $cpactive = true;
- break;
+ if (is_array($config['captiveportal'])) {
+ foreach ($config['captiveportal'] as $cpkey => $cp) {
+ if (isset($cp['enable'])) {
+ $cpactive = true;
+ break;
+ }
}
}
if ($cpactive === false)
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 423aa11..3bea41e 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -1348,7 +1348,7 @@ function system_reboot_cleanup() {
mwexec("/usr/local/bin/beep.sh stop");
require_once("captiveportal.inc");
- if (isset($config['captiveportal'])) {
+ if (is_array($config['captiveportal'])) {
foreach ($config['captiveportal'] as $cpzone=>$cp) {
captiveportal_radius_stop_all();
captiveportal_send_server_accounting(true);
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index bfee28f..2cf22de 100755
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -250,7 +250,7 @@ $pgtitle = array(gettext("Status"),gettext("RRD Graphs"));
$closehead = false;
/* Load all CP zones */
-if ($captiveportal) {
+if ($captiveportal && is_array($config['captiveportal'])) {
$cp_zones_tab_array = array();
foreach($config['captiveportal'] as $cpkey => $cp) {
if (!isset($cp['enable']))
OpenPOWER on IntegriCloud