From 045e4af5d03a15bc891df6331150d99bd7488838 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 19 Mar 2008 02:46:27 +0000 Subject: [PATCH] Fix typo in ftpext class. Handle safe mode errors. PRops DD32. see #5586 git-svn-id: https://develop.svn.wordpress.org/trunk@7393 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-filesystem-ftpext.php | 2 +- wp-admin/includes/file.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 792dae8e0e..b48a125162 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -167,7 +167,7 @@ class WP_Filesystem_FTPext{ } function put_contents($file,$contents,$type=''){ if( empty($type) ){ - $extension = substr(strrchr($filename, "."), 1); + $extension = substr(strrchr($file, "."), 1); $type = isset($this->filetypes[ $extension ]) ? $this->filetypes[ $extension ] : FTP_ASCII; } $temp = tmpfile(); diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index e7ccfcc386..9b68387491 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -203,7 +203,7 @@ function download_url( $url ) { if( ! $tmpfname ) return false; - $handle = fopen($tmpfname, 'w'); + $handle = @fopen($tmpfname, 'w'); if( ! $handle ) return false;