Commit c12bd9a3 authored by Franco Fichtner's avatar Franco Fichtner

interfaces: get_interface_arr() should return an array

but changing the default likely breaks something else so
fix it here...
parent f657ecb1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment