*stab stab stab*
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 19 Apr 2007 13:59:00 +0000 (13:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 19 Apr 2007 13:59:00 +0000 (13:59 +0000)
includes/ProxyTools.php

index e72a338..840c580 100644 (file)
@@ -34,7 +34,7 @@ function wfGetLastIPfromXFF( $xff ) {
                $xff = substr( $xff, 0, 255 );
                // Look for the last IP, assuming they are separated by commas or spaces
                $n = ( strrpos($xff, ',') ) ? strrpos($xff, ',') : strrpos($xff, ' ');
-               if ( strrpos !== false ) {
+               if ( $n !== false ) {
                        $last = trim( substr( $xff, $n + 1 ) );
                        // Make sure it is an IP
                        $m = preg_match('#^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $last);