diff options
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/ProjectAnalytic.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Model/ProjectAnalytic.php b/app/Model/ProjectAnalytic.php index 8ac22626..dbca4eed 100644 --- a/app/Model/ProjectAnalytic.php +++ b/app/Model/ProjectAnalytic.php @@ -167,8 +167,10 @@ class ProjectAnalytic extends Base $sums[$task['column_id']] += ($task['date_completed'] ?: time()) - $task['date_moved']; foreach ($sums as $column_id => $time_spent) { - $stats[$column_id]['count']++; - $stats[$column_id]['time_spent'] += $time_spent; + if (isset($stats[$column_id])) { + $stats[$column_id]['count']++; + $stats[$column_id]['time_spent'] += $time_spent; + } } } |