walkor 3 năm trước cách đây
mục cha
commit
39df5a1627
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Protocols/Http/Request.php

+ 1 - 1
Protocols/Http/Request.php

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