aboutsummaryrefslogtreecommitdiff
path: root/model/Schedule.php
diff options
context:
space:
mode:
authorMaZderMind2015-03-31 17:06:04 +0200
committerMaZderMind2015-03-31 17:07:46 +0200
commitbeb6da0a82c639b117e0e7521475a46731e68071 (patch)
tree3823f7cdc42ba771f0148b970bbc641f7b5f2f9d /model/Schedule.php
parent8b7ab95ad497852607473468b92e968d180a6ec7 (diff)
Avoid Error when getSchedule does not return a mutuable Array
Diffstat (limited to 'model/Schedule.php')
-rw-r--r--model/Schedule.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/model/Schedule.php b/model/Schedule.php
index 0eabc73..0536791 100644
--- a/model/Schedule.php
+++ b/model/Schedule.php
@@ -183,7 +183,8 @@ class Schedule extends ModelBase
public function getDurationSum()
{
$sum = 0;
- foreach(reset($this->getSchedule()) as $event)
+ $schedule = $this->getSchedule();
+ foreach(reset($schedule) as $event)
$sum += $event['duration'];
return $sum;