[wp-trac] [WordPress Trac] #44499: add_query_arg function doesn't remove the empty '?' when an anchor exists

WordPress Trac noreply at wordpress.org
Tue Nov 16 18:49:01 UTC 2021


#44499: add_query_arg function doesn't remove the empty '?' when an anchor exists
---------------------------------------------+-----------------------------
 Reporter:  benjamin.anakena                 |       Owner:  hellofromTonya
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  5.9
Component:  General                          |     Version:  4.9.6
 Severity:  minor                            |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by hellofromTonya):

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


Comment:

 In [changeset:"52187" 52187]:
 {{{
 #!CommitTicketReference repository="" revision="52187"
 HTTP API: Remove empty `?` when only anchor remains in `add_query_arg()`.

 If after processing through `add_query_arg()` a `?#` remains, this commit
 removes the unnecessary and unused `?` character as there are no query
 args in the URL.

 Includes tests.

 Follow-up to [1823], [5193], [5999], [6005].

 Props benjaminanakenam, sabernhardt, costdev, hellofromTonya.
 Fixes #44499.
 }}}

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


More information about the wp-trac mailing list