From a1b4a52dc4ac5a59d9beb5dcad300727d83773e9 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 19 Apr 2007 13:59:00 +0000 Subject: [PATCH] *stab stab stab* --- includes/ProxyTools.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.20.1