Ticket #6776: 6776.diff

File 6776.diff, 0.6 kB (added by DD32, 8 months ago)
  • wp-includes/post-template.php

    old new  
    373373 
    374374// get an attachment page link using an image or icon if possible 
    375375function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false) { 
    376         $_post = & get_post( intval($id) ); 
     376        $id = intval($id); 
     377        $_post = & get_post( $id ); 
    377378 
    378379        if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) ) 
    379380                return __('Missing Attachment');