mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Merge pull request #693 from skipperbent/v5-development
Version 5.4.1.2
This commit is contained in:
@@ -164,6 +164,11 @@ class Url implements JsonSerializable
|
||||
*/
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user