Silence some exected warnings in ftpext. Props DD32. see #5586
git-svn-id: https://develop.svn.wordpress.org/trunk@7039 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
78f9d0757a
commit
7e98ec2a8b
@ -276,14 +276,14 @@ class WP_Filesystem_FTPext{
|
||||
|
||||
function delete($file,$recursive=false) {
|
||||
if ( $this->is_file($file) )
|
||||
return ftp_delete($this->link,$file);
|
||||
return @ftp_delete($this->link,$file);
|
||||
if ( !$recursive )
|
||||
return ftp_rmdir($this->link,$file);
|
||||
return @ftp_rmdir($this->link,$file);
|
||||
$filelist = $this->dirlist($file);
|
||||
foreach ($filelist as $filename => $fileinfo) {
|
||||
$this->delete($file.'/'.$filename,$recursive);
|
||||
}
|
||||
return ftp_rmdir($this->link,$file);
|
||||
return @ftp_rmdir($this->link,$file);
|
||||
}
|
||||
|
||||
function exists($file){
|
||||
@ -297,8 +297,8 @@ class WP_Filesystem_FTPext{
|
||||
}
|
||||
function is_dir($path){
|
||||
$cwd = $this->cwd();
|
||||
if ( ftp_chdir($this->link, $path) ) {
|
||||
ftp_chdir($this->link, $cwd);
|
||||
if ( @ftp_chdir($this->link, $path) ) {
|
||||
@ftp_chdir($this->link, $cwd);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user