aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorFlorian Larysch2016-10-23 15:42:20 +0200
committerFlorian Larysch2016-10-23 15:42:20 +0200
commitf8f43e3d4c4b7f1da8514e650ade181b397e1418 (patch)
treefd6d8441685fc33b988c695f0678303661e06bce /model
parent348d30647f829a91ab97e5834530f8c9a2d536df (diff)
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.
Diffstat (limited to 'model')
-rw-r--r--model/Relive.php3
1 files changed, 3 insertions, 0 deletions
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);