From d9f7210f9dcef141622dad998e9b2b1a136e8857 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Wed, 10 Feb 2016 10:00:00 +0000 Subject: Fix one last warning --- lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib.php b/lib.php index 6ff39db..d04ca45 100644 --- a/lib.php +++ b/lib.php @@ -485,7 +485,11 @@ S; $newdata = array(); foreach ($data as $duration => $count) { if (false !== strpos($duration, 'hour')) { - $newdata['60 minutes'] += $count; + if (!array_key_exists('20 minutes', $newdata)) { + $newdata['60 minutes'] = $count; + } else { + $newdata['60 minutes'] += $count; + } } else { $d = explode(' ', $duration); if ($d[0] >= 20 && $d[1] == "minutes") { -- cgit v1.2.1