Revision 1540194f
Added by Ermal LUÇI almost 14 years ago
etc/inc/captiveportal.inc | ||
---|---|---|
1241 | 1241 |
if (is_array($remove)) { |
1242 | 1242 |
if (!empty($remove)) { |
1243 | 1243 |
$cpdb = captiveportal_read_db(true); |
1244 |
foreach ($remove as $key) |
|
1245 |
unset($cpdb[$key]); |
|
1244 |
foreach ($remove as $key) { |
|
1245 |
if (is_array($key)) |
|
1246 |
log_error("Captive portal Array passed as unset index: " . print_r($key, true)); |
|
1247 |
else |
|
1248 |
unset($cpdb[$key]); |
|
1249 |
} |
|
1246 | 1250 |
} else |
1247 | 1251 |
return; //This makes sure no record removal calls |
1248 | 1252 |
} |
Also available in: Unified diff
PHP says that arrays cannot be used as keys, protect against this case as reported that some keys are arrays!