diff options
Diffstat (limited to 'modules-available/statistics_reporting/inc/getdata.inc.php')
-rw-r--r-- | modules-available/statistics_reporting/inc/getdata.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/statistics_reporting/inc/getdata.inc.php b/modules-available/statistics_reporting/inc/getdata.inc.php index 13d39502..90af0c58 100644 --- a/modules-available/statistics_reporting/inc/getdata.inc.php +++ b/modules-available/statistics_reporting/inc/getdata.inc.php @@ -105,7 +105,7 @@ class GetData $anonymize = 0 !== ($flags & GETDATA_ANONYMOUS); $res = Queries::getUserStatistics(self::$from, self::$to, self::$lowerTimeBound, self::$upperTimeBound); $data = array(); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { if ($anonymize && $row['name'] !== 'anonymous') { $row['name'] = md5($row['name'] . self::$salt); } @@ -120,7 +120,7 @@ class GetData $anonymize = 0 !== ($flags & GETDATA_ANONYMOUS); $res = Queries::getVMStatistics(self::$from, self::$to, self::$lowerTimeBound, self::$upperTimeBound); $data = array(); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { self::nullToZero($row); if ($anonymize) { $row['name'] = md5($row['name'] . self::$salt); |