[wp-trac] [WordPress Trac] #5159: Patch prevents an Undefined Variable error in get_attachment_icon()

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 7 06:01:00 GMT 2007


#5159: Patch prevents an Undefined Variable error in get_attachment_icon()
---------------------+------------------------------------------------------
 Reporter:  richcon  |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.5      
Component:  General  |     Version:  2.3      
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 The included patch prevents an Undefined Variable E_NOTICE error from
 being triggered in get_attachment_icon()
 (wp-includes/post-template.php)

 On line 453:
      $icon = "<img src='$src' title='$post_title' alt='$post_title'
 $constraint/>";

 the variable $constraint is not defined if the icon's image fits within
 the allowed size.

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


More information about the wp-trac mailing list