Opened 3 years ago
Last modified 2 months ago
#44499 new defect (bug)
add_query_arg function doesn't remove the empty '?' when an anchor exists
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | minor | Version: | 4.9.6 |
Component: | General | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
To reproduce:
<?php $url = 'https://domain.com/uri?param=value#anchor'; $url = add_query_arg( 'param', false, $url ); echo $url;
Expected value: https://domain.com/uri#anchor
Returned value: https://domain.com/uri?#anchor
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
replace
?#
with#