From 51005b397d617503477e4a1787162d514ce02e65 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 30 Aug 2006 04:02:12 +0000 Subject: [PATCH] Allow passing an associative array of query vars to avoid parse_str overhead. git-svn-id: http://svn.automattic.com/wordpress/trunk@4128 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 24b28dea56..7fa51d627a 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -334,7 +334,10 @@ class WP_Query { function parse_query ($query) { if ( !empty($query) || !isset($this->query) ) { $this->init(); - parse_str($query, $qv); + if ( is_array($query) ) + $qv = & $query; + else + parse_str($query, $qv); $this->query = $query; $this->query_vars = $qv; }