Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2326 closed defect (bug) (fixed)

add_query_arg incorrectly sets uri with arguments of associative array and no oldquery_or_uri

Reported by: majelbstoat's profile majelbstoat Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Administration Keywords: add_query_arg uri path bg|has-patch
Focuses: Cc:

Description

Currently, if you call this:

add_query_arg(array('key' => 'val'));

the uri is generated from the non-existant func_get_arg(1) , which always returns an empty string. The patch supplied checks to see if a second argument exists and if it doesn't uses the request uri instead.

Attachments (1)

fix for uri in add_query_arg.diff (472 bytes) - added by majelbstoat 19 years ago.
Patch to provide proper uri base when calling add_query_arg with an associative array and no existing uri.

Download all attachments as: .zip

Change History (7)

@majelbstoat
19 years ago

Patch to provide proper uri base when calling add_query_arg with an associative array and no existing uri.

#1 @majelbstoat
19 years ago

  • Milestone set to 2.0.1

#3 @ryan
19 years ago

  • Owner changed from anonymous to ryan

#4 @matt
19 years ago

Proper behaviour would probably be returning false.

#5 @ryan
19 years ago

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

(In [3474]) add_query_arg() fix from majelbstoat. fixes #2326

#6 @(none)
18 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.