[Debug] fix checkip6

This commit is contained in:
Neime 2014-11-25 12:52:09 +01:00 committed by Fabien Potencier
parent f68b7c7d9d
commit 1da0ba4150

View File

@ -39,7 +39,7 @@ class IpUtils
$ips = array($ips);
}
$method = false !== strpos($requestIp, ':') ? 'checkIp6' : 'checkIp4';
$method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4';
foreach ($ips as $ip) {
if (self::$method($requestIp, $ip)) {