diff options
author | MaZderMind | 2015-03-31 08:23:15 +0200 |
---|---|---|
committer | MaZderMind | 2015-03-31 08:23:15 +0200 |
commit | 72722fe3c6e88a683c07b5ee1989e61610d4b7aa (patch) | |
tree | 1a69816c88d80adac8d62b37eb1d22de6197aab1 | |
parent | 1a050c087e8f2889b421992350c50fae75a9252b (diff) |
Don't 500 when the Schedule is unreachable
-rw-r--r-- | model/Schedule.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/model/Schedule.php b/model/Schedule.php index e6aef7c..0eabc73 100644 --- a/model/Schedule.php +++ b/model/Schedule.php @@ -37,7 +37,13 @@ class Schedule extends ModelBase return $schedule; // download schedule-xml - $schedule = $this->fetchSchedule(); + try { + $schedule = $this->fetchSchedule(); + } + catch(ErrorException $e) + { + return array(); + } $mapping = $this->getScheduleToRoomSlugMapping(); $program = array(); |