Skip to content

Commit

Permalink
host
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Mar 23, 2022
1 parent 03c0812 commit 39df5a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Protocols/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function protocolVersion()
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;
Expand Down

0 comments on commit 39df5a1

Please sign in to comment.