[wp-trac] [WordPress Trac] #31306: add_query_arg changes numerical arguments

WordPress Trac noreply at wordpress.org
Thu Feb 12 12:54:18 UTC 2015


#31306: add_query_arg changes numerical arguments
--------------------------+------------------------------
 Reporter:  Lex_Robinson  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.1
 Severity:  minor         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by tyxla):

 I was able to reproduce this issue, too.

 And @Lex_Robinson, yes, your assumption is correct here - `array_merge()`
 flattens the integer indexes. Replacing that `array_merge()` with
 `array_replace()` will do the job, overriding what's necessary from the
 old query vars, but preserving the query vars with numeric keys.

 Patch coming up shortly.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31306#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list