From 614fecf492fe2b17390a3769db38bd2ef81a30d5 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 16 Jan 2007 19:05:01 +0000 Subject: [PATCH] Discard non-scalars when building query string. git-svn-id: http://svn.automattic.com/wordpress/trunk@4753 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 40a41c0215..47470d3048 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -224,6 +224,8 @@ class WP { foreach (array_keys($this->query_vars) as $wpvar) { if ( '' != $this->query_vars[$wpvar] ) { $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]); } }