diff --git a/src/UrlInfo/UrlInfo.php b/src/UrlInfo/UrlInfo.php index 9fdf045..1529ae6 100644 --- a/src/UrlInfo/UrlInfo.php +++ b/src/UrlInfo/UrlInfo.php @@ -213,7 +213,7 @@ class UrlInfo { * @return $this */ public function setProtocol (?string $protocol = null): self { - $this->protocol = self::ensureNull(mb_strtolower($protocol)); + $this->protocol = self::ensureNull(mb_strtolower($protocol ?? '')); return $this; } @@ -241,7 +241,7 @@ class UrlInfo { * @return $this */ public function setHost (?string $host = null): self { - $this->host = self::ensureNull(mb_strtolower($host)); + $this->host = self::ensureNull(mb_strtolower($host ?? '')); return $this; }