[wp-trac] [WordPress Trac] #52725: WP5.7-RC2-50494 Warning: Cannot modify header information
WordPress Trac
noreply at wordpress.org
Fri Mar 5 19:28:42 UTC 2021
#52725: WP5.7-RC2-50494 Warning: Cannot modify header information
-------------------------------+------------------------------
Reporter: mitfi | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: trunk
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: administration
-------------------------------+------------------------------
Comment (by SergeyBiryukov):
> `Warning: Cannot modify header information - headers already sent by
(output started at /.../wp-admin/includes/template.php:2526) in /.../wp-
includes/pluggable.php on line 1329`
> `Warning: Cannot modify header information - headers already sent by
(output started at /.../wp-admin/includes/template.php:2526) in /.../wp-
includes/pluggable.php on line 1332`
Just noting that these warnings are caused by calling `wp_redirect()`
after the output has already started from the `_wp_admin_html_begin()`
function.
As noted above, this does not seems specific to WordPress 5.7. A solution
would be to perform the redirects as soon as possible, before any output.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52725#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list