数组语法调整

This commit is contained in:
thinkphp
2016-11-21 15:33:55 +08:00
parent a3a76b9bcf
commit a10cc77e40

View File

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