[wp-trac] [WordPress Trac] #63224: Undefined array key "QUERY_STRING" in _wp_get_site_editor_redirection_url()

WordPress Trac noreply at wordpress.org
Mon Apr 7 22:13:45 UTC 2025


#63224: Undefined array key "QUERY_STRING" in _wp_get_site_editor_redirection_url()
------------------------------------+----------------------------
 Reporter:  akshaydhere             |       Owner:  peterwilsoncc
     Type:  defect (bug)            |      Status:  closed
 Priority:  normal                  |   Milestone:  6.8
Component:  Editor                  |     Version:  trunk
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+----------------------------
Changes (by peterwilsoncc):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60135" 60135]:
 {{{
 #!CommitTicketReference repository="" revision="60135"
 Site Editor: Fix PHP warning in `_wp_get_site_editor_redirection_url()`.

 Fixes a PHP Warning for an undefined array key "QUERY_STRING" in
 `_wp_get_site_editor_redirection_url()` in some PHP configurations.

 Depending on the configuration, `$_SERVER['QUERY_STRING']` can either be
 unset or an empty string when no query string included in the URL. This
 changes the condition from a falsey check to an `empty()` check.

 Reviewed by Mamaduka.
 Merges [60134] to the 6.8 branch.

 Props akshaydhere, dilipbheda, johnbillion, rainynewt, sabernhardt,
 sainathpoojary, shovan_jaya, tusharaddweb, wildworks.
 Fixes #63224.
 }}}

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


More information about the wp-trac mailing list