mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
PHP says that arrays cannot be used as keys, protect against this case as reported that some keys are arrays!
This commit is contained in:
parent
f45075dd98
commit
1540194f7d
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user