From ef9ef91187dc96274b384cd1856c637181a9ad79 Mon Sep 17 00:00:00 2001 From: Tamara Gunkel <tamara.gunkel@web.de> Date: Tue, 16 Nov 2021 22:21:14 +0100 Subject: [PATCH] fix key not existing --- filter.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/filter.php b/filter.php index 2139619..9dd707a 100644 --- a/filter.php +++ b/filter.php @@ -57,9 +57,13 @@ class filter_opencast extends moodle_text_filter foreach (\tool_opencast\local\settings_api::get_ocinstances() as $ocinstance) { $episodeurl = get_config('filter_opencast', 'episodeurl_' . $ocinstance->id); + if(!$episodeurl) { + continue; + } + $urlparts = parse_url($episodeurl); $baseurl = $urlparts['scheme'] . '://' . $urlparts['host']; - if ($urlparts['port']) { + if (isset($urlparts['port'])) { $baseurl .= $urlparts['port']; } -- GitLab