|
|
@@ -224,7 +224,7 @@ class Request
|
|
|
public function host($without_port = false)
|
|
|
{
|
|
|
$host = $this->header('host');
|
|
|
- if ($without_port && $pos = \strpos($host, ':')) {
|
|
|
+ if ($host && $without_port && $pos = \strpos($host, ':')) {
|
|
|
return \substr($host, 0, $pos);
|
|
|
}
|
|
|
return $host;
|