mirror of
https://github.com/voc/streaming-website
synced 2024-11-15 00:47:14 +00:00
Merge branch 'master' into events/33c3
This commit is contained in:
commit
30adc57318
1 changed files with 7 additions and 2 deletions
|
@ -36,10 +36,10 @@ class Schedule
|
|||
|
||||
private function fetchSchedule()
|
||||
{
|
||||
$schedule = file_get_contents($this->getScheduleCache());
|
||||
$schedule = @file_get_contents($this->getScheduleCache());
|
||||
|
||||
if(!$schedule)
|
||||
throw new ScheduleException("Error Loading Schedule from ".$this->getScheduleCache());
|
||||
return null;
|
||||
|
||||
return simplexml_load_string($schedule);
|
||||
}
|
||||
|
@ -49,6 +49,11 @@ class Schedule
|
|||
// download schedule-xml
|
||||
$schedule = $this->fetchSchedule();
|
||||
|
||||
// not failing gracefully here will result in a broken page in case
|
||||
// no schedule is present
|
||||
if(!$schedule)
|
||||
return [];
|
||||
|
||||
$mapping = $this->getScheduleToRoomSlugMapping();
|
||||
$program = array();
|
||||
|
||||
|
|
Loading…
Reference in a new issue