[wp-trac] [WordPress Trac] #48283: Cron: 'Headers already sent' warning with `ALTERNATE_WP_CRON`
WordPress Trac
noreply at wordpress.org
Thu Oct 10 22:33:04 UTC 2019
#48283: Cron: 'Headers already sent' warning with `ALTERNATE_WP_CRON`
--------------------------+-----------------------------
Reporter: dlh | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------------
After [45560], a "Headers already sent" warning is generated when
`ALTERNATE_WP_CRON` is enabled. The cause seems to be that `spawn_cron()`
adds headers via `wp_redirect()` and then sends headers before loading
`wp-cron.php`.
The attached patch would add a `headers_sent()` check before the two
caching headers.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48283>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list