Skip to content

Commit

Permalink
Fix ternary operator usage in RequestMatcher::checkIpv6()
Browse files Browse the repository at this point in the history
  • Loading branch information
dsp committed Nov 1, 2011
1 parent d7a5351 commit c5e2def
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/RequestMatcher.php
Expand Up @@ -165,7 +165,7 @@ protected function checkIp6($requestIp, $ip)

for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; $i++) {
$left = $netmask - 16 * ($i-1);
$left = ($left <= 16) ?: 16;
$left = ($left <= 16) ? $left : 16;
$mask = ~(0xffff >> $left) & 0xffff;
if (($bytes_addr[$i] & $mask) != ($bytes_test[$i] & $mask)) {
return false;
Expand Down

0 comments on commit c5e2def

Please sign in to comment.