Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#3308 closed defect (bug) (fixed)

add_query_arg() removes blank query vars

Reported by: markjaquith Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: General Keywords:
Focuses: Cc:


skeltoac: can anybody explain why add_query_arg removes blank query vars?

This results in a destructive query var addition, in which existing (but blank) args disappear.

remove_query_arg() was removing by passing a blank string. Upcoming patch moves that to FALSE, which allows blank query vars to be added.

It also preserves ?foo&bar=test vs ?foo=&bar=test

In all, it just preserves the existing QS a whole lot better.

Attachments (1)

allow_blank_query_vars.diff (934 bytes) - added by markjaquith 12 years ago.
Patch for trunk

Download all attachments as: .zip

Change History (2)

12 years ago

Patch for trunk

#1 @markjaquith
12 years ago

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

(In [4435]) Better preservation of query string when using add_query_arg(). Props in self- and Andy-flavored varieties. fixes #3308

Note: See TracTickets for help on using tickets.