`date_query` should be a property on `WP_Comment_Query` objects.

Instead of a local variable.

Props flixos90.
Fixes #36741.
Built from https://develop.svn.wordpress.org/trunk@37354


git-svn-id: http://core.svn.wordpress.org/trunk@37320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2016-05-03 16:15:29 +00:00
parent ebfc1467bb
commit 2f66998e3f
2 changed files with 4 additions and 5 deletions

View File

@ -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'] );

View File

@ -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.