[wp-trac] [WordPress Trac] #45989: WSODs protection still 500 on REST API request
WordPress Trac
noreply at wordpress.org
Tue Mar 19 21:32:11 UTC 2019
#45989: WSODs protection still 500 on REST API request
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner: schlessera
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.2
Component: Bootstrap/Load | Version: trunk
Severity: major | Resolution:
Keywords: needs-patch servehappy needs- | Focuses: multisite
testing |
-------------------------------------------------+-------------------------
Comment (by spacedmonkey):
The reason we have to check if header_sent, two fold.
1. If the fatal error happens mid way through the render of say the home
page, call wp_die, will render another html and body tag. This is unlikely
that this is what anyone would want.
2. wp_die sets no-cache header and status code to 500. This can't be done
if headers are already set.
If headers already sent, we can just echo the message and die...
This idea was discussed before, but @schlessera had some issue with it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45989#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list