Unbreak filter_get_direct_networks()

Check if the array is empty
This commit is contained in:
Seth Mos 2009-10-23 00:24:25 +02:00
parent 340de029b3
commit da82a94a7d

View File

@ -490,8 +490,9 @@ function filter_get_direct_networks_list() {
/* build list of directly connected interfaces and networks */
$networks = "";
$networks_arr = array();
if (!isset($FilterIflist))
if (empty($FilterIflist)) {
filter_generate_optcfg_array();
}
foreach ($FilterIflist as $ifent => $ifcfg) {
if(is_subnet($ifcfg['sa'])) {
$networks_arr[] = $subnet;