[wp-trac] [WordPress Trac] #9922: wp_crop_image() and image_resize() are inconsistent. Both should return WP_Error objects on error.

WordPress Trac wp-trac at lists.automattic.com
Sat May 23 22:47:51 GMT 2009


#9922: wp_crop_image() and image_resize() are inconsistent.  Both should return
WP_Error objects on error.
--------------------------+-------------------------------------------------
 Reporter:  mdawaffe      |       Owner:          
     Type:  defect (bug)  |      Status:  new     
 Priority:  normal        |   Milestone:  2.9     
Component:  Media         |     Version:          
 Severity:  normal        |    Keywords:  WP_Error
--------------------------+-------------------------------------------------
 wp_crop_image() returns a string on error.  resize_image() returns a
 WP_Error object.

 Both use wp_load_image() and should have consistent return values.

 Attached.  Assigned to 2.9. 2.8?

 I also think wp_load_image() should return a WP_Error object instead of a
 string on error, but maybe that's a separate ticket.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9922>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list