From d8b38366fb61d31152d0a41b609ae90d603bd48a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 27 Apr 2018 17:25:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } /**