[wp-trac] [WordPress Trac] #40787: REST API: Attempts to output headers without confirming headers have not been sent
WordPress Trac
noreply at wordpress.org
Wed May 17 14:24:12 UTC 2017
#40787: REST API: Attempts to output headers without confirming headers have not
been sent
--------------------------+-----------------------------
Reporter: kraftbj | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
The `rest_handle_deprecated_function` and
`rest_handle_deprecated_argument` functions fire `header()` without
confirming if headers have already been sent or not.
This can result in PHP warnings, which depending on the site's settings,
will output into the REST API response, which breaks JSON.
{{{
Error: Warning: Cannot modify header information - headers already sent by
(output started at /public_html//wp-includes/functions.php:3720) in
/public_html/wp-includes/rest-api.php on line 492
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40787>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list