mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Fixed error message "Invalid argument supplied for foreach()" and "in_array() expects parameter 2 to be array"
This commit is contained in:
parent
5093d94db3
commit
e3e7f3b313
@ -267,6 +267,10 @@ function isInACL($ip)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (! is_array($config['list_ACL_IPs_for_API'])) {
|
||||
$config['list_ACL_IPs_for_API'] = explode(';', $config['list_ACL_IPs_for_API']);
|
||||
}
|
||||
|
||||
if (in_array($ip, $config['list_ACL_IPs_for_API'])) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user