From a0740155c5480a455173b7f0e6cd80b111ffba5d Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sun, 16 May 2010 21:00:00 +0000 Subject: [PATCH] Make get_attachment_metadata() loop safe. git-svn-id: https://develop.svn.wordpress.org/trunk@14699 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index e34f0a3266..1efd90b2cd 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3536,7 +3536,7 @@ function wp_delete_attachment( $post_id, $force_delete = false ) { * @param bool $unfiltered Optional, default is false. If true, filters are not run. * @return string|bool Attachment meta field. False on failure. */ -function wp_get_attachment_metadata( $post_id, $unfiltered = false ) { +function wp_get_attachment_metadata( $post_id = 0, $unfiltered = false ) { $post_id = (int) $post_id; if ( !$post =& get_post( $post_id ) ) return false;