walkor 3 anni fa
parent
commit
39df5a1627
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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)
     {
         $host = $this->header('host');
-        if ($without_port && $pos = \strpos($host, ':')) {
+        if ($host && $without_port && $pos = \strpos($host, ':')) {
             return \substr($host, 0, $pos);
         }
         return $host;