From abd37fe4a78da1fa40e7b5ae6e5ffc6aad7b29cc Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 22 Jan 2013 16:54:38 +0000 Subject: [PATCH] Comment Query: Use $this->query_vars instead of the nonexistent shorthand $q. see #23208. git-svn-id: http://core.svn.wordpress.org/trunk@23325 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 78a364acb0..966e76529f 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -292,13 +292,13 @@ class WP_Comment_Query { 'user_id', ); if ( ! empty( $this->query_vars['meta_key'] ) ) { - $allowed_keys[] = $q['meta_key']; + $allowed_keys[] = $this->query_vars['meta_key']; $allowed_keys[] = 'meta_value'; $allowed_keys[] = 'meta_value_num'; } $ordersby = array_intersect( $ordersby, $allowed_keys ); foreach ( $ordersby as $key => $value ) { - if ( $value == $q['meta_key'] || $value == 'meta_value' ) { + if ( $value == $this->query_vars['meta_key'] || $value == 'meta_value' ) { $ordersby[ $key ] = "$wpdb->commentmeta.meta_value"; } elseif ( $value == 'meta_value_num' ) { $ordersby[ $key ] = "$wpdb->commentmeta.meta_value+0";