From 81e4c3199edd4e92f66fe7db6bc36d30d16ee96d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 16 Jan 2016 19:40:26 -0500 Subject: Fix unit test (PHP 5.4 regression) --- app/Analytic/AverageTimeSpentColumnAnalytic.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/Analytic/AverageTimeSpentColumnAnalytic.php b/app/Analytic/AverageTimeSpentColumnAnalytic.php index 820db801..c3cff548 100644 --- a/app/Analytic/AverageTimeSpentColumnAnalytic.php +++ b/app/Analytic/AverageTimeSpentColumnAnalytic.php @@ -63,7 +63,9 @@ class AverageTimeSpentColumnAnalytic extends Base */ private function processTasks(array &$stats, $project_id) { - foreach ($this->getTasks($project_id) as &$task) { + $tasks = $this->getTasks($project_id); + + foreach ($tasks as &$task) { foreach ($this->getTaskTimeByColumns($task) as $column_id => $time_spent) { if (isset($stats[$column_id])) { $stats[$column_id]['count']++; -- cgit v1.2.3