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

Merges [30438] to the 3.9 branch.

Built from https://develop.svn.wordpress.org/branches/3.9@30440


git-svn-id: http://core.svn.wordpress.org/branches/3.9@30435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-11-20 13:59:09 +00:00
parent bb7e7f5a0b
commit 5594f44f40
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'] ) ) {