mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-19 09:05:22 +01:00
Discard non-scalars when building query string.
git-svn-id: http://svn.automattic.com/wordpress/trunk@4753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8f84936e4b
commit
614fecf492
@ -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
Block a user