Make WordPress Core

Ticket #24459: 24459.3.diff

File 24459.3.diff, 1.0 KB (added by nacin, 12 years ago)
  • wp-includes/class-wp-image-editor.php

     
    327327         * @return boolean
    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;
     331                        $arguments[1] = null;
    337332                        ob_start();
     333                } else {
     334                        // The directory containing the original file may no longer exist when using a replication plugin.
     335                        wp_mkdir_p( dirname( $filename ) );
    338336                }
    339337
    340338                $result = call_user_func_array( $function, $arguments );
     
    342340                if ( $result && $stream ) {
    343341                        $contents = ob_get_contents();
    344342
    345                         $fp = fopen( $dst_file, 'w' );
     343                        $fp = fopen( $filename, 'w' );
    346344
    347345                        if ( ! $fp )
    348346                                return false;