WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/07/2010 01:59:30 AM (12 years ago)
Author:
dd32
Message:

Standardise return values in WP_Filesystem::dirlist(), ::chmod() and ::exists()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php

    r12998 r12999  
    225225
    226226    function is_file($file) {
    227         return $this->is_dir($file) ? false : true;
     227        if ( $this->is_dir($file) )
     228            return false;
     229        if ( $this->exists($file) )
     230            return true;
     231        return false;
    228232    }
    229233
     
    289293
    290294        $list = $this->ftp->dirlist($path);
    291         if ( ! $list )
     295        if ( empty($list) && !$this->exists($path) )
    292296            return false;
    293297
Note: See TracChangeset for help on using the changeset viewer.