Skip to content

Commit

Permalink
Merge pull request #693 from skipperbent/v5-development
Browse files Browse the repository at this point in the history
Version 5.4.1.2
  • Loading branch information
skipperbent authored Nov 27, 2023
2 parents 3c03f08 + 6448365 commit d75af21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Pecee/Http/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ public function getHost(bool $includeTrails = false): ?string
*/
public function setHost(string $host): self
{
// Strip any potential ports from hostname
if (strpos($host, ':') !== false) {
$host = strstr($host, strrchr($host, ':'), true);
}

$this->host = $host;

return $this;
Expand Down

0 comments on commit d75af21

Please sign in to comment.