From 85917677415ee507303e73a307fa61d077c3a21c Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 20 Apr 2008 06:45:13 +0000 Subject: [PATCH] Fix pass by ref error. Props DD32. fixes #6776 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@7749 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 1aa81ae45..db0f03f83 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -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');