]> git.mxchange.org Git - friendica.git/commitdiff
Prevent a fatal error for an empty parameter in "unparseURL"
authorMichael Vogel <icarus@dabo.de>
Fri, 23 Aug 2019 05:19:08 +0000 (07:19 +0200)
committerMichael Vogel <icarus@dabo.de>
Fri, 23 Aug 2019 05:19:08 +0000 (07:19 +0200)
src/Content/Text/HTML.php

index c8bed0b9d69e03b53f5fab1be5ec7b06988e191f..ddc587d72a58ddb73d0ec42d7a730807c11290c0 100644 (file)
@@ -419,6 +419,10 @@ class HTML
                $link = $matches[0];
                $url = $matches[1];
 
+               if (empty($url) || empty(parse_url($url))) {
+                       return $matches[0];
+               }
+
                $parts = array_merge($base, parse_url($url));
                $url2 = Network::unparseURL($parts);