Fix notice in get_media_items().

git-svn-id: http://svn.automattic.com/wordpress/trunk@14059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-04-10 12:49:58 +00:00
parent e0eea8e857
commit 0de035558e
1 changed files with 1 additions and 0 deletions

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' )