Index: wp-admin/includes/class-ftp.php
===================================================================
--- wp-admin/includes/class-ftp.php	(revision 12337)
+++ wp-admin/includes/class-ftp.php	(working copy)
@@ -278,7 +278,8 @@
 	        $dns=@gethostbyaddr($host);
 	        if(!$ip) $ip=$host;
 	        if(!$dns) $dns=$host;
-			if(ip2long($ip) === -1) {
+			$ip_long = ip2long($ip);
+			if ( false === $ip_long || -1 == $ip_long ) {
 				$this->SendMSG("Wrong host name/address \"".$host."\"");
 				return FALSE;
 			}
