parse_url returns null in case a parameter is not found

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-07-29 08:32:20 +02:00
parent 1f42a8b5cb
commit 9127731c52
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ class Client implements IClient {
}
$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");
throw new LocalServerException('Could not detect any host');
}