[wp-trac] [WordPress Trac] #56566: Fatal error when WP_REST_Server::dispatch() returns WP_Error
WordPress Trac
noreply at wordpress.org
Wed Sep 14 10:37:49 UTC 2022
#56566: Fatal error when WP_REST_Server::dispatch() returns WP_Error
--------------------------+-----------------------------
Reporter: DaveFX | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 6.0.2
Severity: major | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
We are getting a Fatal error in our site when the
WP_REST_Server::embed_links() method calls the WP_REST_Server::dispatch()
method, and this latter one returns a WP_Error object.
After this, the method calls the filter rest_post_dispatch, and the two
hooked functions (rest_send_allow_header and rest_filter_response_fields)
will generate a fatal error if the filtered value is a WP_Error instead of
a WP_Rest_Response.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56566>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list