Commit 76e32398 authored by Franco Fichtner's avatar Franco Fichtner

inc: better safe than sorry

parent 26d16c6a
...@@ -160,6 +160,7 @@ function legacy_interface_stats($ifs) ...@@ -160,6 +160,7 @@ function legacy_interface_stats($ifs)
return $stats; return $stats;
} }
if (count($count)) {
/* first one is header */ /* first one is header */
array_shift($out); array_shift($out);
...@@ -167,6 +168,7 @@ function legacy_interface_stats($ifs) ...@@ -167,6 +168,7 @@ function legacy_interface_stats($ifs)
$stat = explode(':', $line); $stat = explode(':', $line);
$stats[trim($stat[0])] = trim($stat[1]); $stats[trim($stat[0])] = trim($stat[1]);
} }
}
return $stats; return $stats;
} }
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