[wp-trac] [WordPress Trac] #36166: wp_die() doesn't accept a WP_Error during unit testing
WordPress Trac
noreply at wordpress.org
Thu Mar 10 13:42:36 UTC 2016
#36166: wp_die() doesn't accept a WP_Error during unit testing
------------------------------+------------------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+------------------------------
Changes (by utkarshpatel):
* keywords: needs-patch => has-patch
Comment:
I debug the issue and found when we call `wp_die()` from PHPunit it is
going inside the default die handler of ajax `_ajax_wp_die_handler` and
that function is not designed to handle WP_Error object.
I don't know if this is right way but here i've handled `WP_Error` in
`_ajax_wp_die_handler()`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36166#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list