ソースを参照

merged branch dsp/2.0 (PR #2534)

Commits
-------

c5e2def Fix ternary operator usage in RequestMatcher::checkIpv6()

Discussion
----------

Fix ternary operator usage in RequestMatcher::checkIpv6()
Fabien Potencier 13 年 前
コミット
ea836cb360
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/Symfony/Component/HttpFoundation/RequestMatcher.php

+ 1 - 1
src/Symfony/Component/HttpFoundation/RequestMatcher.php

@@ -165,7 +165,7 @@ class RequestMatcher implements RequestMatcherInterface
 
         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;