Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4465 closed defect (bug) (fixed)

add_query_arg() uses REQUEST_URI when it is undesirable to do so

Reported by: markjaquith's profile markjaquith Owned by:
Milestone: 2.2.1 Priority: normal
Severity: normal Version: 2.2
Component: General Keywords:
Focuses: Cc:

Description

mod_rewrite permalinks, blog URL as domain root.

from http://example.com/page/2/

code:

echo remove_query_arg('arbitrary', '');

expected result is a blank string (remove a query arg from a blank string, you should get that same blank string back).

actual result:

/page/2/

It's using the REQUEST URI because it thinks you haven't provided your own query string. But you have... it's just blank. add_query_arg() and remove_query_arg() need to use something other than a blank string to designate that the user has neglected to provide their own QS.

Change History (2)

#1 @markjaquith
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5705]) use FALSE to designate lack of user-supplied URL in *_query_arg() funcs. fixes #4465 for 2.3 (trunk)

#2 @markjaquith
17 years ago

(In [5706]) use FALSE to designate lack of user-supplied URL in *_query_arg() funcs. fixes #4465 for 2.2.x

Note: See TracTickets for help on using tickets.