mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
interfaces: get_interface_arr() should return an array
but changing the default likely breaks something else so fix it here...
This commit is contained in:
parent
f657ecb1fa
commit
c12bd9a3ad
@ -112,21 +112,24 @@ function get_interface_arr($flush = false)
|
||||
return $interface_arr_cache;
|
||||
}
|
||||
|
||||
/*
|
||||
* does_interface_exist($interface): return true or false if a interface is
|
||||
* detected.
|
||||
*/
|
||||
function does_interface_exist($interface, $flush = true) {
|
||||
function does_interface_exist($interface, $flush = true)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if(!$interface)
|
||||
if(!$interface) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$ints = get_interface_arr($flush);
|
||||
if (in_array($interface, $ints))
|
||||
return true;
|
||||
else
|
||||
if ($ints == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!in_array($interface, $ints)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user