From a10cc77e406d53eb730b27d6f1a5adc5ea56a7c8 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 21 Nov 2016 15:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E7=BB=84=E8=AF=AD=E6=B3=95=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= 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 45b65423..d77e4e77 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1258,7 +1258,7 @@ class Request } // IP地址合法验证 $long = sprintf("%u", ip2long($ip)); - $ip = $long ? array($ip, $long) : array('0.0.0.0', 0); + $ip = $long ? [$ip, $long] : ['0.0.0.0', 0]; return $ip[$type]; }