Skip to content

Commit

Permalink
Fixed getUrl() not working for home urls.
Browse files Browse the repository at this point in the history
  • Loading branch information
skipperbent committed Dec 11, 2023
1 parent 3534233 commit 0634ba7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Pecee/Http/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -95,6 +95,7 @@ public function parse(?string $url, bool $setOriginalPath = false): self
$this->setQueryString($data['query']);
}
}

return $this;
}

Expand Down

0 comments on commit 0634ba7

Please sign in to comment.