mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
PHP7.3 compatibility: Fix compact throwing notices.
In PHP 7.3, the `compact()` function has been changed to issue an `E_NOTICE` level error if a passed string refers to an unset variable. In previous versions of PHP, this notice was silently skipped. The full RFC can be viewed here: https://wiki.php.net/rfc/compact. Props jorbin, desrosj. Merges [43819] and [43832] to trunk. Fixes #44416. git-svn-id: https://develop.svn.wordpress.org/trunk@44166 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -635,6 +635,7 @@ class WP_Comment_Query {
|
||||
$number = absint( $this->query_vars['number'] );
|
||||
$offset = absint( $this->query_vars['offset'] );
|
||||
$paged = absint( $this->query_vars['paged'] );
|
||||
$limits = '';
|
||||
|
||||
if ( ! empty( $number ) ) {
|
||||
if ( $offset ) {
|
||||
@@ -819,7 +820,8 @@ class WP_Comment_Query {
|
||||
$this->sql_clauses['where']['post_author__not_in'] = 'post_author NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['post_author__not_in'] ) ) . ' )';
|
||||
}
|
||||
|
||||
$join = '';
|
||||
$join = '';
|
||||
$groupby = '';
|
||||
|
||||
if ( $join_posts_table ) {
|
||||
$join .= "JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID";
|
||||
|
||||
Reference in New Issue
Block a user