From f8f43e3d4c4b7f1da8514e650ade181b397e1418 Mon Sep 17 00:00:00 2001 From: Florian Larysch Date: Sun, 23 Oct 2016 15:42:20 +0200 Subject: relive: fail gracefully if no relive data exists Often, the relive manifest is not available in the beginning of a conference as a result of configuration errors. Display an empty list instead of crashing and printing a stacktrace in that situation. --- model/Relive.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'model/Relive.php') diff --git a/model/Relive.php b/model/Relive.php index 3dfe823..d0e7522 100644 --- a/model/Relive.php +++ b/model/Relive.php @@ -15,6 +15,9 @@ class Relive extends ModelBase public function getTalks() { + if(!file_exists($this->getJsonUrl())) + return array(); + $talks = file_get_contents($this->getJsonUrl()); $talks = (array)json_decode($talks, true); -- cgit v1.2.3