Discard non-scalars when building query string.
git-svn-id: https://develop.svn.wordpress.org/trunk@4753 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
de62091671
commit
22f99849eb
|
@ -224,6 +224,8 @@ class WP {
|
||||||
foreach (array_keys($this->query_vars) as $wpvar) {
|
foreach (array_keys($this->query_vars) as $wpvar) {
|
||||||
if ( '' != $this->query_vars[$wpvar] ) {
|
if ( '' != $this->query_vars[$wpvar] ) {
|
||||||
$this->query_string .= (strlen($this->query_string) < 1) ? '' : '&';
|
$this->query_string .= (strlen($this->query_string) < 1) ? '' : '&';
|
||||||
|
if ( !is_scalar($this->query_vars[$wpvar]) ) // Discard non-scalars.
|
||||||
|
continue;
|
||||||
$this->query_string .= $wpvar . '=' . rawurlencode($this->query_vars[$wpvar]);
|
$this->query_string .= $wpvar . '=' . rawurlencode($this->query_vars[$wpvar]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue