diff --git a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php index eae452f542..771123ff5a 100644 --- a/wp-includes/class-wp-comment-query.php +++ b/wp-includes/class-wp-comment-query.php @@ -833,10 +833,9 @@ class WP_Comment_Query { } } - $date_query = $this->query_vars['date_query']; - if ( ! empty( $date_query ) && is_array( $date_query ) ) { - $date_query_object = new WP_Date_Query( $date_query, 'comment_date' ); - $this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $date_query_object->get_sql() ); + if ( ! empty( $this->query_vars['date_query'] ) && is_array( $this->query_vars['date_query'] ) ) { + $this->date_query = new WP_Date_Query( $this->query_vars['date_query'], 'comment_date' ); + $this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() ); } $where = implode( ' AND ', $this->sql_clauses['where'] ); diff --git a/wp-includes/version.php b/wp-includes/version.php index c167a571e3..54cec302e1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37353'; +$wp_version = '4.6-alpha-37354'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.