Make WordPress Core

Changeset 35946


Ignore:
Timestamp:
12/15/2015 03:11:17 AM (9 years ago)
Author:
dd32
Message:

Filesystem: Avoid PHP warnings when using the FTP Sockets class.
See #35026

File:
1 edited

Legend:

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

    r34282 r35946  
    695695        foreach($list as $k=>$v) {
    696696            $list[$k]=$this->parselisting($v);
    697             if($list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
     697            if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
    698698        }
    699699        $ret=true;
     
    728728        foreach($list as $k=>$v) {
    729729            $list[$k]=$this->parselisting($v);
    730             if($list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
     730            if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
    731731        }
    732732        $ret=true;
Note: See TracChangeset for help on using the changeset viewer.