From 559417280674b947e93542477246452f1c2eab99 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 1 Nov 2005 07:47:21 +0000 Subject: [PATCH] PHP 5 compatibility --- includes/ProxyTools.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ProxyTools.php b/includes/ProxyTools.php index 24108aaef6..5e0f6dde7f 100644 --- a/includes/ProxyTools.php +++ b/includes/ProxyTools.php @@ -58,7 +58,7 @@ function wfGetIP() { /** */ function wfIP2Unsigned( $ip ) { $n = ip2long( $ip ); - if ( $n == -1 ) { + if ( $n == -1 || $n === false ) { # Return value on error depends on PHP version $n = false; } elseif ( $n < 0 ) { $n += pow( 2, 32 ); -- 2.20.1