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 b6562527df5d51835d3e7061d69813e89c0f3bc0..ee401c1948953fadc040a17c27999c3a3a800acd 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 80133fd7a8f746063c98f9c683bbbfc5bed8c82a..98d2b21eef2401ac50f13fcda7a39819c5f944eb 100644
--- a/lib/visual.inc.php
+++ b/lib/visual.inc.php
@@ -330,7 +330,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){