From 72722fe3c6e88a683c07b5ee1989e61610d4b7aa Mon Sep 17 00:00:00 2001
From: MaZderMind
Date: Tue, 31 Mar 2015 08:23:15 +0200
Subject: Don't 500 when the Schedule is unreachable

---
 model/Schedule.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'model')

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();
-- 
cgit v1.2.3