mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-08 22:54:36 +00:00
Respect numerical keys in add_query_arg(), use array_replace() instead of array_merge().
Adds unit test. Props tyxla. Fixes #31306. git-svn-id: https://develop.svn.wordpress.org/trunk@31966 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -782,7 +782,7 @@ function add_query_arg() {
|
||||
$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string
|
||||
if ( is_array( $args[0] ) ) {
|
||||
$kayvees = $args[0];
|
||||
$qs = array_merge( $qs, $kayvees );
|
||||
$qs = array_replace( $qs, $kayvees );
|
||||
} else {
|
||||
$qs[ $args[0] ] = $args[1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user