[wp-trac] [WordPress Trac] #22438: wp_generate_attachment_metadata() should not call WP_Image_Editor if there's nothing to resize

WordPress Trac noreply at wordpress.org
Wed Nov 14 11:16:12 UTC 2012


#22438: wp_generate_attachment_metadata() should not call WP_Image_Editor if
there's nothing to resize
--------------------------+------------------------------
 Reporter:  mdawaffe      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by mdawaffe):

 I put in the else condition to set {{{$metadata['sizes'] = array()}}}
 since that's what the current behavior in trunk is: {{{::multi_resize()}}}
 returns an empty array if {{{$sizes}}} is empty.

 In 3.4, {{{$metadata['sizes']}}} would have been left unset.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22438#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list