Silence some exected warnings in ftpext. Props DD32. see #5586
git-svn-id: http://svn.automattic.com/wordpress/trunk@7039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4446c81177
commit
e0649b751c
|
@ -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