mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Retunr WP_Error from wp_crop_image() and image_resize(). Props mdwaffe. fixes #9922
git-svn-id: https://develop.svn.wordpress.org/trunk@12524 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -355,7 +355,7 @@ function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $de
|
||||
|
||||
$image = wp_load_image( $file );
|
||||
if ( !is_resource( $image ) )
|
||||
return new WP_Error('error_loading_image', $image);
|
||||
return new WP_Error( 'error_loading_image', $image, $file );
|
||||
|
||||
$size = @getimagesize( $file );
|
||||
if ( !$size )
|
||||
|
||||
Reference in New Issue
Block a user