summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-02-10 10:00:00 +0000
committerPascal Terjan <pterjan@gmail.com>2016-02-10 10:00:00 +0000
commitd9f7210f9dcef141622dad998e9b2b1a136e8857 (patch)
tree5d308281decffd62866277857d04e5edce964550
parent3baebd9c4f438534ff6a0104091105468a7fd910 (diff)
downloadpkgsubmit-d9f7210f9dcef141622dad998e9b2b1a136e8857.tar
pkgsubmit-d9f7210f9dcef141622dad998e9b2b1a136e8857.tar.gz
pkgsubmit-d9f7210f9dcef141622dad998e9b2b1a136e8857.tar.bz2
pkgsubmit-d9f7210f9dcef141622dad998e9b2b1a136e8857.tar.xz
pkgsubmit-d9f7210f9dcef141622dad998e9b2b1a136e8857.zip
Fix one last warning
-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") {