WordPress.org

Make WordPress Core

Changeset 43848


Ignore:
Timestamp:
10/31/2018 06:00:03 AM (14 months ago)
Author:
pento
Message:

FTP/PemFTP Library: Fix some PHP notices.

  • ftp_base::glob() used each(), which is deprecated as of PHP 7.2.
  • ftp_base::fget() was missing the decleration of its third parameter, $rest.

Props itowhid06.
See #44489.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/includes/class-ftp.php

    r38470 r43848  
    525525    }
    526526
    527     function fget($fp, $remotefile,$rest=0) {
     527    function fget($fp, $remotefile, $rest=0) {
    528528        if($this->_can_restore and $rest!=0) fseek($fp, $rest);
    529529        $pi=pathinfo($remotefile);
     
    584584    }
    585585
    586     function fput($remotefile, $fp) {
     586    function fput($remotefile, $fp, $rest=0) {
    587587        if($this->_can_restore and $rest!=0) fseek($fp, $rest);
    588588        $pi=pathinfo($remotefile);
     
    776776        } else $path=getcwd();
    777777        if(is_array($handle) and !empty($handle)) {
    778             while($dir=each($handle)) {
     778            foreach($handle as $dir) {
    779779                if($this->glob_pattern_match($pattern,$dir))
    780780                $output[]=$dir;
Note: See TracChangeset for help on using the changeset viewer.