From 684727610fe4fb8415b5cde58d1af2ee7794c683 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 30 Sep 2011 22:52:29 +0000 Subject: [PATCH] Prevent the uploader getting stuck when deleting the only image from the gallery, props ocean90, fixes #15118 git-svn-id: https://develop.svn.wordpress.org/trunk@18850 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/media-upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/media-upload.php b/wp-admin/media-upload.php index 22fc5640e0..1331f0afef 100644 --- a/wp-admin/media-upload.php +++ b/wp-admin/media-upload.php @@ -117,7 +117,7 @@ if ( isset($_GET['inline']) ) { $body_id = 'media-upload'; // let the action code decide how to handle the request - if ( $tab == 'type' || $tab == 'type_url' ) + if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab , media_upload_tabs() ) ) do_action("media_upload_$type"); else do_action("media_upload_$tab");