diff --git a/app/controllers/blubber.php b/app/controllers/blubber.php
index bd86050a1e44f1a14b60e9dfef7522b04418fb32..c0490f03d379b9807b6c4e4e66395fdbe610a5ca 100644
--- a/app/controllers/blubber.php
+++ b/app/controllers/blubber.php
@@ -351,7 +351,7 @@ class BlubberController extends AuthenticatedController
                     if (mb_strpos($file['type'], 'video') !== false) {
                         $type = 'video';
                     }
-                    if (mb_strpos($file['type'], 'audio') !== false || mb_strpos($file_ref['name'], '.ogg') !== false) {
+                    if (mb_strpos($file['type'], 'audio') !== false || mb_strpos($file['name'], '.ogg') !== false) {
                         $type = 'audio';
                     }
                     if ($type) {
diff --git a/lib/classes/StudipCoreFormat.php b/lib/classes/StudipCoreFormat.php
index 389256f937fdd0a3b33dddbf638308dc1bb8e706..4d4b14b855fe4952027e0edfc4fec333f3a6f791 100644
--- a/lib/classes/StudipCoreFormat.php
+++ b/lib/classes/StudipCoreFormat.php
@@ -568,7 +568,8 @@ class StudipCoreFormat extends TextFormat
         if (
             in_array($pu['scheme'], ['http', 'https'])
             && (
-                $pu['host'] === $_SERVER['HTTP_HOST']
+                !isset($pu['host'])
+                || $pu['host'] === $_SERVER['HTTP_HOST']
                 || (isset($pu['port']) && $pu['host'] . ':' . $pu['port'] === $_SERVER['HTTP_HOST'])
             )
             && mb_strpos($pu['path'], $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP']) === 0
diff --git a/lib/visual.inc.php b/lib/visual.inc.php
index a00205480c921a6e83e1a6e12ce57e2eeaaf4071..30f99497519c416ebed424481e0513725953bd31 100644
--- a/lib/visual.inc.php
+++ b/lib/visual.inc.php
@@ -313,7 +313,7 @@ function idna_link($link, $mail = false) {
         return $link;
     }
     $pu = @parse_url($link);
-    if (preg_match('/&\w+;/i', $pu['host'])) { //umlaute?  (html-coded)
+    if (isset($pu['host']) && preg_match('/&\w+;/i', $pu['host'])) { //umlaute?  (html-coded)
         $IDN = new Algo26\IdnaConvert\ToIdn();
         $out = false;
         if ($mail){