aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hubel2020-10-31 21:13:03 +0100
committerAndreas Hubel2020-10-31 21:13:03 +0100
commitc7bee023a4e00c48edd092c0bfe93d4cd650eff5 (patch)
tree86ef383b9bfc22aef88ae8c975c77bee1c493dd2
parentc31a16cb6d9057883cc5f46376c190a8a8736546 (diff)
bugfix for empty schedule
-rw-r--r--configs/conferences/sotm2020/config.php6
-rw-r--r--model/Schedule.php8
2 files changed, 8 insertions, 6 deletions
diff --git a/configs/conferences/sotm2020/config.php b/configs/conferences/sotm2020/config.php
index bf13cc8..5e069d3 100644
--- a/configs/conferences/sotm2020/config.php
+++ b/configs/conferences/sotm2020/config.php
@@ -82,7 +82,7 @@ $CONFIG['CONFERENCE'] = array(
* Link zu den Recordings
* Wird diese Zeile auskommentiert, wird der Link nicht angezeigt
*/
- 'RELEASES' => 'http://media.ccc.de/c/sotm2020',
+ 'RELEASES' => 'https://media.ccc.de/c/sotm2020',
/**
* Um die interne ReLive-Ansicht zu aktivieren, kann hier ein ReLive-JSON
@@ -92,7 +92,7 @@ $CONFIG['CONFERENCE'] = array(
*
* Wird diese Zeile auskommentiert, wird der Link nicht angezeigt
*/
- 'RELIVE_JSON' => 'http://relive.c3voc.de/relive/sotm2020/index.json',
+ 'RELIVE_JSON' => 'https://relive.c3voc.de/relive/sotm2020/index.json',
);
/**
@@ -178,7 +178,7 @@ $CONFIG['SCHEDULE'] = array(
* das Script configs/download.sh heruntergeladen, welches von einem
* Cronjob regelmäßig getriggert wird.
*/
- 'URL' => 'http://sotm.osmz.ru/2020.xml',
+ 'URL' => 'https://sotm.osmz.ru/2020.xml',
/**
* Nur die angegebenen Räume aus dem Fahrplan beachten
diff --git a/model/Schedule.php b/model/Schedule.php
index 739d2c8..52eac4e 100644
--- a/model/Schedule.php
+++ b/model/Schedule.php
@@ -295,9 +295,11 @@ class Schedule
{
$sum = 0;
$schedule = $this->getSchedule();
- foreach(reset($schedule) as $event)
- $sum += $event['duration'];
-
+ if ($schedule) {
+ foreach(reset($schedule) as $event) {
+ $sum += $event['duration'];
+ }
+ }
return $sum;
}