From a9ea5413fc5c87ad401c3cea8a2a6c616f7a2da5 Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Sun, 11 Feb 2024 16:32:48 +0100 Subject: [PATCH] Fix depreciation giving null to mb_strtolower --- src/UrlInfo/UrlInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }