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

This commit is contained in:
Ad Schellevis 2017-02-22 18:10:32 +01:00
parent bdd1be3962
commit 679dd0b846

View File

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