diff --git a/library/think/Request.php b/library/think/Request.php index 8a0dc80d..6a6e6b50 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1353,7 +1353,7 @@ class Request $host = $this->server('HTTP_HOST'); } - return true === $strict ? strstr($host, ':', true) : $host; + return true === $strict && strpos($host, ':') ? strstr($host, ':', true) : $host; } /**