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; }