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

Merges [30438] to the 3.7 branch.

Built from https://develop.svn.wordpress.org/branches/3.7@30442


git-svn-id: http://core.svn.wordpress.org/branches/3.7@30437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-11-20 14:00:18 +00:00
parent c2b7538b1c
commit 3d16a38fc4
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,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'] ) ) {