1
0
Fork 0

Merge pull request #7553 from annando/fatal

Prevent a fatal error for an empty parameter in "unparseURL"
This commit is contained in:
Philipp 2019-08-23 08:44:51 +02:00 committed by GitHub
commit b914900ff5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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