diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/Schedule.php | 3 |
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; |