summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib.php6
1 files changed, 5 insertions, 1 deletions
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") {