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:
Ryan Boren
2009-12-23 18:39:31 +00:00
parent 95ea3693b1
commit 7ccd64fbe7
3 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -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 )