diff --git a/src/wp-admin/includes/class-ftp.php b/src/wp-admin/includes/class-ftp.php index 35f670ff38..c0a7dbc8c0 100644 --- a/src/wp-admin/includes/class-ftp.php +++ b/src/wp-admin/includes/class-ftp.php @@ -524,7 +524,7 @@ class ftp_base { return $exists; } - function fget($fp, $remotefile,$rest=0) { + function fget($fp, $remotefile, $rest=0) { if($this->_can_restore and $rest!=0) fseek($fp, $rest); $pi=pathinfo($remotefile); if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; @@ -583,7 +583,7 @@ class ftp_base { return $out; } - function fput($remotefile, $fp) { + function fput($remotefile, $fp, $rest=0) { if($this->_can_restore and $rest!=0) fseek($fp, $rest); $pi=pathinfo($remotefile); if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; @@ -775,7 +775,7 @@ class ftp_base { $pattern=substr($pattern,$lastpos); } else $path=getcwd(); if(is_array($handle) and !empty($handle)) { - while($dir=each($handle)) { + foreach($handle as $dir) { if($this->glob_pattern_match($pattern,$dir)) $output[]=$dir; }