mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 14:44:21 +00:00
Avoid Error when getSchedule does not return a mutuable Array
This commit is contained in:
parent
8b7ab95ad4
commit
beb6da0a82
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue