From 301d551981d9579909242684059048ce99b8a881 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 10 Nov 2024 23:20:08 +0100 Subject: [PATCH] Fix host url --- src/Pecee/Http/Url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pecee/Http/Url.php b/src/Pecee/Http/Url.php index a76f733..292d6e6 100644 --- a/src/Pecee/Http/Url.php +++ b/src/Pecee/Http/Url.php @@ -75,8 +75,8 @@ public function parse(?string $url, bool $setOriginalPath = false): self if ($url !== null) { $data = $this->parseUrl($url); - $this->scheme = $data['scheme'] ?? null; - $this->host = $data['host'] ?? null; + $this->scheme = $data['scheme'] ?? $this->scheme; + $this->host = $data['host'] ?? $this->host; $this->port = $data['port'] ?? null; $this->username = $data['user'] ?? null; $this->password = $data['pass'] ?? null;