Changeset 24727
- Timestamp:
- 07/17/2013 09:16:44 PM (12 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-image-editor-gd.php
r24055 r24727 402 402 } 403 403 } 404 405 /** 406 * Either calls editor's save function or handles file as a stream. 407 * 408 * @since 3.5.0 409 * @access protected 410 * 411 * @param string|stream $filename 412 * @param callable $function 413 * @param array $arguments 414 * @return boolean 415 */ 416 protected function make_image( $filename, $function, $arguments ) { 417 if ( wp_is_stream( $filename ) ) 418 $arguments[1] = null; 419 420 return parent::make_image( $filename, $function, $arguments ); 421 } 404 422 } -
trunk/wp-includes/class-wp-image-editor.php
r24055 r24727 328 328 */ 329 329 protected function make_image( $filename, $function, $arguments ) { 330 $dst_file = $filename;331 332 // The directory containing the original file may no longer exist when using a replication plugin.333 wp_mkdir_p( dirname( $dst_file ) );334 335 330 if ( $stream = wp_is_stream( $filename ) ) { 336 $filename = null;337 331 ob_start(); 332 } else { 333 // The directory containing the original file may no longer exist when using a replication plugin. 334 wp_mkdir_p( dirname( $filename ) ); 338 335 } 339 336 … … 343 340 $contents = ob_get_contents(); 344 341 345 $fp = fopen( $ dst_file, 'w' );342 $fp = fopen( $filename, 'w' ); 346 343 347 344 if ( ! $fp )
Note: See TracChangeset
for help on using the changeset viewer.