From 54786c0cc5bb59c8fded4233cadab5a440d2e7ed Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@4128 602fd350-edb4-49c9-b593-d223f7449a82 --- 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; }