diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index 662a5b108b..3d7374cf93 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -2629,8 +2629,10 @@ class WP_Query { */ $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) ); } + $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; + $climits = ( ! empty( $climits ) ) ? $climits : ''; $comments = (array) $wpdb->get_results( "SELECT $distinct {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits" ); // Convert to WP_Comment diff --git a/wp-includes/version.php b/wp-includes/version.php index 759b1a24d9..9b62d052be 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45590'; +$wp_version = '5.3-alpha-45591'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.