mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 22:02:15 +00:00
Fixed setHost nullable value
This commit is contained in:
@@ -406,7 +406,7 @@ class Request
|
|||||||
public function setHost(?string $host): void
|
public function setHost(?string $host): void
|
||||||
{
|
{
|
||||||
// Strip any potential ports from hostname
|
// Strip any potential ports from hostname
|
||||||
if (strpos($host, ':') !== false) {
|
if (strpos((string)$host, ':') !== false) {
|
||||||
$host = strstr($host, strrchr($host, ':'), true);
|
$host = strstr($host, strrchr($host, ':'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user