Avoid the use of `array_replace()` in `add_query_arg()`.
`array_replace()` was introduced PHP 5.3+. Instead, we walk the array manually. See [31966]. Fixes #31306. Built from https://develop.svn.wordpress.org/trunk@31967 git-svn-id: http://core.svn.wordpress.org/trunk@31946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c113cb5130
commit
481352bd2e
|
@ -781,8 +781,9 @@ function add_query_arg() {
|
||||||
wp_parse_str( $query, $qs );
|
wp_parse_str( $query, $qs );
|
||||||
$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string
|
$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string
|
||||||
if ( is_array( $args[0] ) ) {
|
if ( is_array( $args[0] ) ) {
|
||||||
$kayvees = $args[0];
|
foreach ( $args[0] as $k => $v ) {
|
||||||
$qs = array_replace( $qs, $kayvees );
|
$qs[ $k ] = $v;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$qs[ $args[0] ] = $args[1];
|
$qs[ $args[0] ] = $args[1];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-beta3-31966';
|
$wp_version = '4.2-beta3-31967';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue