Don't obliterate $title if $desc isn't set. Props kawauso. Fixes #18185.

git-svn-id: https://develop.svn.wordpress.org/trunk@18698 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2011-09-17 18:27:32 +00:00
parent 1bc9770151
commit 73744eb96c
1 changed files with 2 additions and 1 deletions

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(