[wp-trac] [WordPress Trac] #17626: image_get_intermediate_size() may return wrong thumbnail size

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 3 01:10:17 UTC 2011


#17626: image_get_intermediate_size() may return wrong thumbnail size
-------------------------------------+------------------------------
 Reporter:  chipbennett              |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------

Comment (by scribu):

 Note that, even if you define the compare_sizes() function inside the if,
 it's still created globally.

 Better to define it outside of image_get_intermediate_size(), as a private
 helper function - that is to say with a leading underscore:
 _compare_sizes(), or something even more obscure, to prevent collisions.

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


More information about the wp-trac mailing list