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
This commit is contained in:
parent
f76f2a692a
commit
d85e040859
|
@ -129,7 +129,7 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
|
||||||
*/
|
*/
|
||||||
public function dieHandler( $message ) {
|
public function dieHandler( $message ) {
|
||||||
$this->_last_response .= ob_get_clean();
|
$this->_last_response .= ob_get_clean();
|
||||||
ob_end_clean();
|
|
||||||
if ( '' === $this->_last_response ) {
|
if ( '' === $this->_last_response ) {
|
||||||
if ( is_scalar( $message) ) {
|
if ( is_scalar( $message) ) {
|
||||||
throw new WPAjaxDieStopException( (string) $message );
|
throw new WPAjaxDieStopException( (string) $message );
|
||||||
|
|
Loading…
Reference in New Issue