Changeset 22192
- Timestamp:
- 10/11/2012 06:59:41 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image-edit.php
r22094 r22192 569 569 570 570 $img = WP_Image_Editor::get_instance( _load_image_to_edit_path( $post_id, 'full' ) ); 571 if ( !$img) {571 if ( is_wp_error( $img ) ) { 572 572 $return->error = esc_js( __('Unable to create new image.') ); 573 573 return $return; -
trunk/wp-admin/includes/image.php
r22094 r22192 34 34 35 35 $editor = WP_Image_Editor::get_instance( $src_file ); 36 if ( is_wp_error( $editor ) ) 37 return $editor; 38 36 39 $src = $editor->crop( $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs ); 37 38 40 if ( is_wp_error( $src ) ) 39 41 return $src; … … 95 97 96 98 $editor = WP_Image_Editor::get_instance( $file ); 97 $metadata['sizes'] = $editor->multi_resize( $sizes ); 99 100 if ( ! is_wp_error( $editor ) ) 101 $metadata['sizes'] = $editor->multi_resize( $sizes ); 98 102 99 103 // fetch additional metadata from exif/iptc -
trunk/wp-includes/media.php
r22184 r22192 384 384 $editor = WP_Image_Editor::get_instance( $file ); 385 385 386 if ( is_wp_error( $editor ->resize( $width, $height, $crop ) ) );386 if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) ); 387 387 return false; 388 388
Note: See TracChangeset
for help on using the changeset viewer.