Opened 7 years ago

Closed 7 years ago

Last modified 6 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 Owned by: ryan
Priority: normal Milestone:
Component: Administration Version: 2.0
Severity: normal Keywords: add_query_arg uri path bg|has-patch
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 7 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)

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

  • Milestone set to 2.0.1

Valid.

comment:3   ryan7 years ago

  • Owner changed from anonymous to ryan

comment:4   matt7 years ago

Proper behaviour would probably be returning false.

comment:5   ryan7 years ago

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

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

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.