mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Respect numerical keys in add_query_arg()
, use array_replace()
instead of array_merge()
.
Adds unit test. Props tyxla. Fixes #31306. Built from https://develop.svn.wordpress.org/trunk@31966 git-svn-id: http://core.svn.wordpress.org/trunk@31945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8ec192ce1f
commit
c113cb5130
@ -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];
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-beta3-31965';
|
||||
$wp_version = '4.2-beta3-31966';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user