From 22f99849eb5f2c9873bcbb8d23dd86fda2a85493 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 16 Jan 2007 19:05:01 +0000 Subject: [PATCH] Discard non-scalars when building query string. git-svn-id: https://develop.svn.wordpress.org/trunk@4753 602fd350-edb4-49c9-b593-d223f7449a82 --- 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]); } }