Query: Make sure `$climits` variable in `WP_Query::get_posts()` is always defined to avoid a PHP notice.
Props juiiee8487, agengineering. Fixes #47638. Built from https://develop.svn.wordpress.org/trunk@45591 git-svn-id: http://core.svn.wordpress.org/trunk@45402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4803fc405e
commit
268c64913e
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue