From 0634ba79dcc37ebc698e0a1f1560a68466a5a367 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 11 Dec 2023 22:45:14 +0100 Subject: [PATCH] Fixed getUrl() not working for home urls. --- src/Pecee/Http/Url.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Pecee/Http/Url.php b/src/Pecee/Http/Url.php index 4bd2647..7b15ae4 100644 --- a/src/Pecee/Http/Url.php +++ b/src/Pecee/Http/Url.php @@ -72,7 +72,7 @@ public function __construct(?string $url) public function parse(?string $url, bool $setOriginalPath = false): self { - if ($url !== null && $url !== '/') { + if ($url !== null) { $data = $this->parseUrl($url); $this->scheme = $data['scheme'] ?? null; @@ -95,6 +95,7 @@ public function parse(?string $url, bool $setOriginalPath = false): self $this->setQueryString($data['query']); } } + return $this; }