Make get_attachment_metadata() loop safe.
git-svn-id: https://develop.svn.wordpress.org/trunk@14699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
baf3a2a41e
commit
a0740155c5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user