summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-25 11:47:12 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-25 11:47:12 +0000
commit93ed765955f8891b985805e4d49ba96f8694c6d7 (patch)
tree42ff89930a11947a1e2b569b4293e6ba909d3426
parent4b4271d32446788901a84a880f8ba14ac747801f (diff)
downloadpfsense-93ed765955f8891b985805e4d49ba96f8694c6d7.zip
pfsense-93ed765955f8891b985805e4d49ba96f8694c6d7.tar.gz
Handle the case when no user has logged in. Reported by: http://forum.pfsense.org/index.php/topic,16382.0.html
-rwxr-xr-xusr/local/www/status_captiveportal.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php
index 056adc7..8895437 100755
--- a/usr/local/www/status_captiveportal.php
+++ b/usr/local/www/status_captiveportal.php
@@ -64,7 +64,10 @@ function clientcmp($a, $b) {
}
$cpdb = array();
-$cpcontents = file("/var/db/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
+if (file_exists("/var/db/captiveportal.db"))
+ $cpcontents = file("/var/db/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
+else
+ $cpcontents = array();
foreach ($cpcontents as $cpcontent) {
$cpent = explode(",", $cpcontent);
if ($_GET['showact'])
OpenPOWER on IntegriCloud