aboutsummaryrefslogtreecommitdiff
path: root/model/Schedule.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;