From d7a9037feccd4600a9aa0aaa53d22b64682b44e2 Mon Sep 17 00:00:00 2001 From: azaozz 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: http://svn.automattic.com/wordpress/trunk@18850 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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");