[wp-trac] [WordPress Trac] #63224: Undefined array key "QUERY_STRING" in _wp_get_site_editor_redirection_url() (was: Minor Code Improvement : Warning Cannot modify header information)

WordPress Trac noreply at wordpress.org
Thu Apr 3 06:37:10 UTC 2025


#63224: Undefined array key "QUERY_STRING" in _wp_get_site_editor_redirection_url()
--------------------------+---------------------
 Reporter:  akshaydhere   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.8
Component:  Editor        |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------
Changes (by sabernhardt):

 * component:  Themes => Editor
 * version:   => trunk
 * milestone:  Awaiting Review => 6.8


Old description:

> Got one Warning message in the Twenty Twenty-Five theme while opening in
> Appearance>Editor
> Wordpress Version - development version (6.8-RC2)
> PHP Version - 8.2
>
> Warning - Undefined array key "Query String" in var/www/html/site-
> editor.php on line 34
> Warning - Cannot modify header information- headers already sent by
> (output started at var/www/html/site-editor.php on line 34) in
> var/www/html/wp-admin/admin-header.php on line 14

New description:

 Got one Warning message in the Twenty Twenty-Five theme while opening in
 Appearance>Editor
 WordPress Version - development version (6.8-RC2)
 PHP Version - 8.2

 `Warning - Undefined array key "QUERY_STRING" in .../site-editor.php on
 line 34`
 `Warning - Cannot modify header information- headers already sent by
 (output started at .../site-editor.php on line 34) in .../wp-admin/admin-
 header.php on line 14`

--

Comment:

 I did not find a way to receive the warning either, but I checked the
 history:
 - [59794] added the `_wp_get_site_editor_redirection_url()` function.
 - One of the commits in GB67199
 [https://github.com/WordPress/gutenberg/pull/67199/commits/bc404a3654ce3cccedd074a9b84f2a2f6fc301a8
 #diff-3f02918545185231f447414ccb55c34750f80fc77641bbc88d6b5e52e72bf295R42
 changed the condition], removing `isset()` when it corrected
 `QUERY_STRING`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63224#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list