Index: trunk/phase3/includes/ProxyTools.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | $xff = substr( $xff, 0, 255 ); |
36 | 36 | // Look for the last IP, assuming they are separated by commas or spaces |
37 | 37 | $n = ( strrpos($xff, ',') ) ? strrpos($xff, ',') : strrpos($xff, ' '); |
38 | | - if ( strrpos !== false ) { |
| 38 | + if ( $n !== false ) { |
39 | 39 | $last = trim( substr( $xff, $n + 1 ) ); |
40 | 40 | // Make sure it is an IP |
41 | 41 | $m = preg_match('#^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $last); |