Make get_attachment_metadata() loop safe.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-05-16 21:00:00 +00:00
parent c40e204b6c
commit 01389755c7
1 changed files with 1 additions and 1 deletions

View File

@ -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;