From 551198c5caee1831797788e899006cd329782bd6 Mon Sep 17 00:00:00 2001 From: duck_ Date: Sat, 17 Sep 2011 18:27:32 +0000 Subject: [PATCH] Don't obliterate $title if $desc isn't set. Props kawauso. Fixes #18185. git-svn-id: http://svn.automattic.com/wordpress/trunk@18698 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 07e8e7e33b..59e8c45a20 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -274,7 +274,8 @@ function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = $content = $image_meta['caption']; } - $title = isset($desc) ? $desc : ''; + if ( isset( $desc ) ) + $title = $desc; // Construct the attachment array $attachment = array_merge( array(