diff options
Diffstat (limited to 'modules-available/locationinfo/api.inc.php')
-rw-r--r-- | modules-available/locationinfo/api.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/locationinfo/api.inc.php b/modules-available/locationinfo/api.inc.php index caa9a6ec..ca87c7e4 100644 --- a/modules-available/locationinfo/api.inc.php +++ b/modules-available/locationinfo/api.inc.php @@ -374,7 +374,11 @@ function getCalendar($idList) $serverInstance = CourseBackend::getInstance($server['type']); $setCred = $serverInstance->setCredentials($server['credentials'], $server['url'], $serverid); - $calendarFromBackend = $serverInstance->fetchSchedule($server['idlist']); + $calendarFromBackend = array(); + if ($setCred) { + $calendarFromBackend = $serverInstance->fetchSchedule($server['idlist']); + } + $formattedArray = array(); $resultarray = array(); if ($calendarFromBackend === false || $setCred === false) { |