Commit 0a7f068e authored by Franco Fichtner's avatar Franco Fichtner

config: can only iterate if interfaces are returned

parent b29cece3
......@@ -439,10 +439,12 @@ EOD;
$iflist = get_interface_list(true);
foreach ($iflist as $ifn => $ifa) {
if (!isset($iflist_prev[$ifn])) {
printf(gettext("Detected link-up: %s%s"), $ifn, "\n");
return $ifn;
if (is_array($iflist)) {
foreach ($iflist as $ifn => $ifa) {
if (!isset($iflist_prev[$ifn])) {
printf(gettext("Detected link-up: %s%s"), $ifn, "\n");
return $ifn;
}
}
}
......
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