From: Michael Vogel Date: Fri, 23 Aug 2019 05:19:08 +0000 (+0200) Subject: Prevent a fatal error for an empty parameter in "unparseURL" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=74d93269da6182023e35c8d4ddf7bd5aba9b4309;p=friendica.git Prevent a fatal error for an empty parameter in "unparseURL" --- diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index c8bed0b9d6..ddc587d72a 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -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);