r21378 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21377‎ | r21378 | r21379 >
Date:13:59, 19 April 2007
Author:brion
Status:old
Tags:
Comment:
*stab stab stab*
Modified paths:
  • /trunk/phase3/includes/ProxyTools.php (modified) (history)

Diff [purge]

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