WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/18/2015 08:19:18 AM (4 years ago)
Author:
dd32
Message:

Updates: FTP/PemFTP Library: Remove the usage of deprecated regular expression functions (ereg replaced by PCRE).

Props enshrined, aaroncampbell
Fixes #16026, #33432

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-ftp-pure.php

    r32990 r34281  
    111111                return FALSE;
    112112            }
    113             $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message));
     113            $ip_port = explode(",", preg_replace("/^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*$/s", "\\1", $this->_message));
    114114            $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3];
    115115            $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]);
Note: See TracChangeset for help on using the changeset viewer.