mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Standardise return values in WP_Filesystem::dirlist(), ::chmod() and ::exists()
git-svn-id: https://develop.svn.wordpress.org/trunk@12999 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -224,7 +224,11 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
function is_file($file) {
|
||||
return $this->is_dir($file) ? false : true;
|
||||
if ( $this->is_dir($file) )
|
||||
return false;
|
||||
if ( $this->exists($file) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_dir($path) {
|
||||
@@ -288,7 +292,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
$list = $this->ftp->dirlist($path);
|
||||
if ( ! $list )
|
||||
if ( empty($list) && !$this->exists($path) )
|
||||
return false;
|
||||
|
||||
$ret = array();
|
||||
|
||||
Reference in New Issue
Block a user