[wp-trac] [WordPress Trac] #15614: wp_get_attachment_image functions should check id for an image

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 30 16:01:43 UTC 2010


#15614: wp_get_attachment_image functions should check id for an image
--------------------------+-------------------------------------------------
 Reporter:  mtdewvirus    |       Owner:                  
     Type:  defect (bug)  |      Status:  new             
 Priority:  normal        |   Milestone:  Awaiting Review 
Component:  Media         |     Version:                  
 Severity:  normal        |    Keywords:  attachment,image
--------------------------+-------------------------------------------------
 The wp_get_attachment_image() and wp_get_attachment_image_src() functions
 do not check to be sure the post_id is an attachment image. Running these
 functions on ids that are not images produces unexpected results. Attached
 patch adds a check for wp_attachment_is_image() to the top of each
 function.

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


More information about the wp-trac mailing list