Merge pull request #22044 from nextcloud/backport/22034/stable19

[stable19] parse_url returns null in case a parameter is not found
This commit is contained in:
Morris Jobke 2020-07-30 09:58:23 +02:00 committed by GitHub
commit d7fa01b9ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ class Client implements IClient {
} }
$host = parse_url($uri, PHP_URL_HOST); $host = parse_url($uri, PHP_URL_HOST);
if ($host === false) { if ($host === false || $host === null) {
$this->logger->warning("Could not detect any host in $uri"); $this->logger->warning("Could not detect any host in $uri");
throw new LocalServerException('Could not detect any host'); throw new LocalServerException('Could not detect any host');
} }