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

inc: better safe than sorry

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