mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Updates: FTP/PemFTP Library: Remove the usage of deprecated regular expression functions (ereg replaced by PCRE).
Props enshrined, aaroncampbell Fixes #16026, #33432 git-svn-id: https://develop.svn.wordpress.org/trunk@34281 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -131,9 +131,9 @@ class ftp extends ftp_base {
|
||||
$this->_data_close();
|
||||
return FALSE;
|
||||
}
|
||||
$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));
|
||||
$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));
|
||||
$this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3];
|
||||
$this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]);
|
||||
$this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]);
|
||||
$this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport);
|
||||
if(!@socket_connect($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) {
|
||||
$this->PushError("_data_prepare","socket_connect", socket_strerror(socket_last_error($this->_ftp_data_sock)));
|
||||
|
||||
Reference in New Issue
Block a user