From 2e8d387c3468fd321b13ddc584b3a5d0b5f5468f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 4 Dec 2008 21:47:45 +0000 Subject: [PATCH] Use binary mode for fopen in download_url() git-svn-id: https://develop.svn.wordpress.org/trunk@10048 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 66e6e86843..f3764cb470 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -437,7 +437,7 @@ function download_url( $url ) { if ( ! $tmpfname ) return new WP_Error('http_no_file', __('Could not create Temporary file')); - $handle = @fopen($tmpfname, 'w'); + $handle = @fopen($tmpfname, 'wb'); if ( ! $handle ) return new WP_Error('http_no_file', __('Could not create Temporary file'));