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]; }