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
This commit is contained in:
duck_ 2011-09-17 18:27:32 +00:00
parent b7080959f6
commit 551198c5ca

View File

@ -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(