Return false on WP_Filesystem_FTPext::dirlist() for non-existant folders. See #12232. See #12057

git-svn-id: https://develop.svn.wordpress.org/trunk@14120 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-04-17 04:00:59 +00:00
parent c7c442fce0
commit 73da12c509
1 changed files with 2 additions and 1 deletions

View File

@ -338,7 +338,8 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
}
$pwd = @ftp_pwd($this->link);
$chdir = @ftp_chdir($this->link, $path);
if ( ! @ftp_chdir($this->link, $path) ) // Cant change to folder = folder doesnt exist
return false;
$list = @ftp_rawlist($this->link, '-a', false);
@ftp_chdir($this->link, $pwd);