WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/17/2013 09:16:44 PM (8 years ago)
Author:
ryan
Message:

Fix editing images with GD when using streams.

Props rmccue, markoheijnen, nacin
fixes #24459

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-image-editor.php

    r24055 r24727  
    328328     */
    329329    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 
    335330        if ( $stream = wp_is_stream( $filename ) ) {
    336             $filename = null;
    337331            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 ) );
    338335        }
    339336
     
    343340            $contents = ob_get_contents();
    344341
    345             $fp = fopen( $dst_file, 'w' );
     342            $fp = fopen( $filename, 'w' );
    346343
    347344            if ( ! $fp )
Note: See TracChangeset for help on using the changeset viewer.