Press This: Ensure the error message is printed. props johnbillion

Merges [30438] to the 4.0 branch.

Built from https://develop.svn.wordpress.org/branches/4.0@30439


git-svn-id: http://core.svn.wordpress.org/branches/4.0@30434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-11-20 13:58:56 +00:00
parent 50a4318776
commit 45ca5407f0
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ function press_it() {
// Error handling for media_sideload.
if ( is_wp_error($upload) ) {
wp_delete_post($post_ID);
wp_die($upload);
wp_die( esc_html( $upload->get_error_message() ) );
} else {
// Post formats.
if ( isset( $_POST['post_format'] ) ) {