WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/11/2012 06:59:41 PM (7 years ago)
Author:
ryan
Message:

Check for WP_Error return from WP_Image_Editor::get_instance().

Props markoheijnen
see #6821

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image-edit.php

    r22094 r22192  
    569569
    570570    $img = WP_Image_Editor::get_instance( _load_image_to_edit_path( $post_id, 'full' ) );
    571     if ( !$img ) {
     571    if ( is_wp_error( $img ) ) {
    572572        $return->error = esc_js( __('Unable to create new image.') );
    573573        return $return;
Note: See TracChangeset for help on using the changeset viewer.