diff options
author | MaZderMind | 2015-03-31 17:06:04 +0200 |
---|---|---|
committer | MaZderMind | 2015-03-31 17:07:46 +0200 |
commit | beb6da0a82c639b117e0e7521475a46731e68071 (patch) | |
tree | 3823f7cdc42ba771f0148b970bbc641f7b5f2f9d /model | |
parent | 8b7ab95ad497852607473468b92e968d180a6ec7 (diff) |
Avoid Error when getSchedule does not return a mutuable Array
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; |