From ffdea33618cba5950882c5e229881a4dcc9ebe71 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: https://develop.svn.wordpress.org/trunk@23325 602fd350-edb4-49c9-b593-d223f7449a82 --- 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";