From: Brion Vibber Date: Thu, 19 Apr 2007 13:59:00 +0000 (+0000) Subject: *stab stab stab* X-Git-Tag: 1.31.0-rc.0~53357 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=a1b4a52dc4ac5a59d9beb5dcad300727d83773e9;p=lhc%2Fweb%2Fwiklou.git *stab stab stab* --- diff --git a/includes/ProxyTools.php b/includes/ProxyTools.php index e72a338d14..840c580e23 100644 --- a/includes/ProxyTools.php +++ b/includes/ProxyTools.php @@ -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);