summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-06-15 16:57:18 +0000
committerErmal <eri@pfsense.org>2011-06-15 16:57:18 +0000
commit1540194f7dbd19cbf949bb199dd71432124ce49e (patch)
treeee42a6c370d7bb562ed7b65fbffc6f94e7e13c4c /etc
parentf45075dd98eefbad6d02794a335204c5dc8d7c74 (diff)
downloadpfsense-1540194f7dbd19cbf949bb199dd71432124ce49e.zip
pfsense-1540194f7dbd19cbf949bb199dd71432124ce49e.tar.gz
PHP says that arrays cannot be used as keys, protect against this case as reported that some keys are arrays!
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/captiveportal.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index cd419ff..e54413c 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1241,8 +1241,12 @@ function captiveportal_write_db($cpdb, $locked = false, $remove = false) {
if (is_array($remove)) {
if (!empty($remove)) {
$cpdb = captiveportal_read_db(true);
- foreach ($remove as $key)
- unset($cpdb[$key]);
+ foreach ($remove as $key) {
+ if (is_array($key))
+ log_error("Captive portal Array passed as unset index: " . print_r($key, true));
+ else
+ unset($cpdb[$key]);
+ }
} else
return; //This makes sure no record removal calls
}
OpenPOWER on IntegriCloud