Commit 679dd0b8 authored by Ad Schellevis's avatar Ad Schellevis

(systemhealth) prevent div by zero, for https://github.com/opnsense/core/issues/1421

parent bdd1be39
...@@ -134,6 +134,7 @@ class SystemhealthController extends ApiControllerBase ...@@ -134,6 +134,7 @@ class SystemhealthController extends ApiControllerBase
$from_timestamp = $this->getMaxRange($rra_info)["oldest_timestamp"]; $from_timestamp = $this->getMaxRange($rra_info)["oldest_timestamp"];
$to_timestamp = $this->getMaxRange($rra_info)["newest_timestamp"]; $to_timestamp = $this->getMaxRange($rra_info)["newest_timestamp"];
} }
$max_values = ($max_values <=0) ? 1 : $max_values;
$archives = array(); $archives = array();
// find archive match // find archive match
......
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