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-gd.php

    r24055 r24727  
    402402        }
    403403    }
     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    }
    404422}
Note: See TracChangeset for help on using the changeset viewer.