From 60b73c589cefd2a5a2635dd4aba72037c05e95d0 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 1 Nov 2014 20:25:23 +0000 Subject: [PATCH] Display error message when Media Library upload fails. Props gcorne. Fixes #29891. Built from https://develop.svn.wordpress.org/trunk@30156 git-svn-id: http://core.svn.wordpress.org/trunk@30156 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ms.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index c58fd20e50..66c9cb71f1 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -35,8 +35,9 @@ function check_upload_size( $file ) { if ( upload_is_user_over_quota( false ) ) { $file['error'] = __( 'You have used your space quota. Please delete files before uploading.' ); } - if ( $file['error'] != '0' && !isset($_POST['html-upload']) ) + if ( $file['error'] != '0' && ! isset( $_POST['html-upload'] ) && ( ! defined( 'DOING_AJAX' ) || DOING_AJAX != true ) ) { wp_die( $file['error'] . ' ' . __( 'Back' ) . '' ); + } return $file; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 230f543a6b..7cde277d51 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30155'; +$wp_version = '4.1-alpha-30156'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.