From 963c2b7b8b7d1e54ac9fb770239d2a4673f9b66e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 7 Jun 2017 14:12:12 +0200 Subject: [statistics] Float cannot be array index --- modules-available/statistics/page.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules-available/statistics/page.inc.php') diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index 5ad8bc20..2b12c69f 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -404,7 +404,7 @@ class Page_Statistics extends Page $res = Database::simpleQuery("SELECT mbram, Count(*) AS `count` FROM machine $join WHERE $where GROUP BY mbram", $args); $lines = array(); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - $gb = ceil($row['mbram'] / 1024); + $gb = (int)ceil($row['mbram'] / 1024); for ($i = 1; $i < count($SIZE_RAM); ++$i) { if ($SIZE_RAM[$i] < $gb) { continue; @@ -476,7 +476,7 @@ class Page_Statistics extends Page $total = 0; while ($row = $res->fetch(PDO::FETCH_ASSOC)) { $total += $row['count']; - $gb = ceil($row['id44mb'] / 1024); + $gb = (int)ceil($row['id44mb'] / 1024); for ($i = 1; $i < count($SIZE_ID44); ++$i) { if ($SIZE_ID44[$i] < $gb) { continue; -- cgit v1.2.3-55-g7522