diff options
Diffstat (limited to 'modules-available/statistics/pages/machine.inc.php')
-rw-r--r-- | modules-available/statistics/pages/machine.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php index 24bf7c1e..fe82797d 100644 --- a/modules-available/statistics/pages/machine.inc.php +++ b/modules-available/statistics/pages/machine.inc.php @@ -219,9 +219,9 @@ class SubPage $client['live_cpuidle'] = 100 - $client['live_cpuload']; } $client['live_cputemppercent'] = max(0, min(100, 110 - $client['live_cputemp'])); - $client['ramclass'] = StatisticsStyling::ramColorClass($client['mbram']); + $client['ramclass'] = StatisticsStyling::ramColorClass((int)$client['mbram']); $client['kvmclass'] = StatisticsStyling::kvmColorClass($client['kvmstate']); - $client['hddclass'] = StatisticsStyling::hddColorClass($client['gbtmp']); + $client['hddclass'] = StatisticsStyling::hddColorClass((int)$client['gbtmp']); // Format HDD data to strings foreach ($hdds['hdds'] as &$hdd) { $hdd['smart_status_failed'] = !($client['smart_status//passed'] ?? 1); @@ -405,8 +405,8 @@ class SubPage } if (count($spans['rows']) > 10) { $spans['hasrows2'] = true; - $spans['rows2'] = array_slice($spans['rows'], ceil(count($spans['rows']) / 2)); - $spans['rows'] = array_slice($spans['rows'], 0, ceil(count($spans['rows']) / 2)); + $spans['rows2'] = array_slice($spans['rows'], (int)ceil(count($spans['rows']) / 2)); + $spans['rows'] = array_slice($spans['rows'], 0, (int)ceil(count($spans['rows']) / 2)); } $spans['isclient'] = $client['isclient']; Render::addTemplate('machine-usage', $spans); |