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;
|
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'])) {
|
if (in_array($ip, $config['list_ACL_IPs_for_API'])) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue