Changeset 12387
- Timestamp:
- 12/13/2009 12:02:01 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-ftp.php
r8645 r12387 279 279 if(!$ip) $ip=$host; 280 280 if(!$dns) $dns=$host; 281 if(ip2long($ip) === -1) { 281 // Validate the IPAddress PHP4 returns -1 for invalid, PHP5 false 282 // -1 === "255.255.255.255" which is the broadcast address which is also going to be invalid 283 $ipaslong = ip2long($ip); 284 if ( ($ipaslong == false) || ($ipaslong === -1) ) { 282 285 $this->SendMSG("Wrong host name/address \"".$host."\""); 283 286 return FALSE;
Note: See TracChangeset
for help on using the changeset viewer.