Fix notice in get_media_items().

git-svn-id: https://develop.svn.wordpress.org/trunk@14059 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-04-10 12:49:58 +00:00
parent b57d8d1714
commit 240551a9fa

View File

@ -1120,6 +1120,7 @@ function get_attachment_fields_to_edit($post, $errors = null) {
* @return string
*/
function get_media_items( $post_id, $errors ) {
$attachments = array();
if ( $post_id ) {
$post = get_post($post_id);
if ( $post && $post->post_type == 'attachment' )