From 7caa93fd8fd98b90270f1a1bdd3651ec24e3ace4 Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 12 Feb 2012 19:02:07 +0000 Subject: [PATCH] Make sure we are using the admin-ajax handler when we call wp_die() for WP_Ajax_Response. see #20024. git-svn-id: http://svn.automattic.com/wordpress/trunk@19911 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-ajax-response.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-ajax-response.php b/wp-includes/class-wp-ajax-response.php index 296c7bae1e..2bf974a265 100644 --- a/wp-includes/class-wp-ajax-response.php +++ b/wp-includes/class-wp-ajax-response.php @@ -131,6 +131,9 @@ class WP_Ajax_Response { foreach ( (array) $this->responses as $response ) echo $response; echo ''; - wp_die(); + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) + wp_die(); + else + die(); } }