diff options
author | Ermal <eri@pfsense.org> | 2011-06-15 16:57:18 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-06-15 16:57:18 +0000 |
commit | 1540194f7dbd19cbf949bb199dd71432124ce49e (patch) | |
tree | ee42a6c370d7bb562ed7b65fbffc6f94e7e13c4c | |
parent | f45075dd98eefbad6d02794a335204c5dc8d7c74 (diff) | |
download | pfsense-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!
-rw-r--r-- | etc/inc/captiveportal.inc | 8 |
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 } |