diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index c9f6be4a09..6ea7dd6809 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -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' )