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

git-svn-id: https://develop.svn.wordpress.org/trunk@30438 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-11-20 13:57:12 +00:00
parent 45d6c62707
commit 7e75ef00d2
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'] ) ) {