Ticket #33271: 33271.diff
File 33271.diff, 1.5 KB (added by , 8 years ago) |
---|
-
wp-includes/class-wp-http-curl.php
182 182 // If streaming to a file open a file handle, and setup our curl streaming handler. 183 183 if ( $r['stream'] ) { 184 184 if ( ! WP_DEBUG ) 185 $this->stream_handle = @fopen( $r['filename'], 'w +' );185 $this->stream_handle = @fopen( $r['filename'], 'w' ); 186 186 else 187 $this->stream_handle = fopen( $r['filename'], 'w +' );187 $this->stream_handle = fopen( $r['filename'], 'w' ); 188 188 if ( ! $this->stream_handle ) 189 189 return new WP_Error( 'http_request_failed', sprintf( __( 'Could not open handle for fopen() to %s' ), $r['filename'] ) ); 190 190 } else { -
wp-includes/class-wp-http-streams.php
221 221 // If streaming to a file setup the file handle. 222 222 if ( $r['stream'] ) { 223 223 if ( ! WP_DEBUG ) 224 $stream_handle = @fopen( $r['filename'], 'w +' );224 $stream_handle = @fopen( $r['filename'], 'w' ); 225 225 else 226 $stream_handle = fopen( $r['filename'], 'w +' );226 $stream_handle = fopen( $r['filename'], 'w' ); 227 227 if ( ! $stream_handle ) 228 228 return new WP_Error( 'http_request_failed', sprintf( __( 'Could not open handle for fopen() to %s' ), $r['filename'] ) ); 229 229