Commit 467f41e5 authored by Ad Schellevis's avatar Ad Schellevis

(Systemhealth) fix division by zero on empty data

parent 783a9010
......@@ -183,9 +183,15 @@ class SystemhealthController extends ApiControllerBase
break;
}
}
if ( $overview != 0 ) {
$condensed_rowCount = (int)($rra_info[$last_rra_key]["available_rows"] / $overview);
} else {
$condensed_rowCount = 0;
}
array_push($archives, [
"key" => $last_rra_key,
"condensed_rowCount" => (int)($rra_info[$last_rra_key]["available_rows"] / $overview),
"condensed_rowCount" => $condensed_rowCount,
"condense_by" => (int)$overview,
"type" => "overview"
]);
......
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