[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 Jul 3 15:28:30 UTC 2018
#44499: add_query_arg function doesn't remove the empty '?' when an anchor exists
------------------------------+-----------------------------
Reporter: benjamin.anakena | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.9.6
Severity: minor | Keywords:
Focuses: |
------------------------------+-----------------------------
To reproduce:
{{{#!php
<?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`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44499>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list