Fix pass by ref error. Props DD32. fixes #6776 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@7749 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-04-20 06:45:13 +00:00
parent c72fd439c6
commit c54046696b
1 changed files with 2 additions and 1 deletions

View File

@ -373,7 +373,8 @@ function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $p
// get an attachment page link using an image or icon if possible
function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false) {
$_post = & get_post( intval($id) );
$id = intval($id);
$_post = & get_post( $id );
if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
return __('Missing Attachment');