From d85e040859ccbc11926a9a36e877a368fc1002c0 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 13 Sep 2013 21:32:54 +0000 Subject: [PATCH] Remove the unnecessary call to `ob_end_clean()` directly after `ob_get_clean()` in `WP_Ajax_UnitTestCase::dieHandler()`. This fixes a large number of AJAX errors in debug mode. See #25282. git-svn-id: https://develop.svn.wordpress.org/trunk@25432 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/testcase-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/includes/testcase-ajax.php b/tests/phpunit/includes/testcase-ajax.php index fcceacc42b..acd0c4ae5d 100644 --- a/tests/phpunit/includes/testcase-ajax.php +++ b/tests/phpunit/includes/testcase-ajax.php @@ -129,7 +129,7 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase { */ public function dieHandler( $message ) { $this->_last_response .= ob_get_clean(); - ob_end_clean(); + if ( '' === $this->_last_response ) { if ( is_scalar( $message) ) { throw new WPAjaxDieStopException( (string) $message );