Skip to content

Commit 1da0ba4

Browse files
Neimefabpot
authored andcommitted
[Debug] fix checkip6
1 parent f68b7c7 commit 1da0ba4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/IpUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function checkIp($requestIp, $ips)
3939
$ips = array($ips);
4040
}
4141

42-
$method = false !== strpos($requestIp, ':') ? 'checkIp6' : 'checkIp4';
42+
$method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4';
4343

4444
foreach ($ips as $ip) {
4545
if (self::$method($requestIp, $ip)) {

0 commit comments

Comments
 (0)