diff -r c7c34916027a -r 177826044cd9 wp/wp-admin/includes/class-ftp.php --- a/wp/wp-admin/includes/class-ftp.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-admin/includes/class-ftp.php Mon Oct 14 18:28:13 2019 +0200 @@ -1,9 +1,9 @@ _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 @@ 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 @@ $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; }