Make WordPress Core


Ignore:
Timestamp:
10/11/2012 06:59:41 PM (12 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-includes/media.php

    r22184 r22192  
    384384        $editor = WP_Image_Editor::get_instance( $file );
    385385
    386         if ( is_wp_error( $editor->resize( $width, $height, $crop ) ) );
     386        if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) );
    387387            return false;
    388388
Note: See TracChangeset for help on using the changeset viewer.