﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
19118	Incorrect WP_Error in image_resize	mzaweb		"image_resize in wp-includes/media.php (line 417)


{{{
$dims = image_resize_dimensions($orig_w, $orig_h, $max_w, $max_h, $crop);
if ( !$dims )
    return new WP_Error( 'error_getting_dimensions', __('Could not calculate resized image dimensions') );
}}}


But image_resize_dimensions return false if the new dimensions are bigger or equal the old ones, assuming that you won't want to resize the image.


{{{
// if the resulting image would be the same size or larger we don't want to resize it
if ( $new_w >= $orig_w && $new_h >= $orig_h )
    return false;
}}}
 

If this is the intended functionality, it shouldn't throw a WP_Error. I think the check for if we want to resize or not should be done in image_resize instead."	defect (bug)	closed	normal		Media	3.2.1	normal	invalid		mzaweb
