WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/24/2018 04:32:29 PM (2 years ago)
Author:
jorbin
Message:

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

This fixes all unit tested code that uses compact.

Props desrosj.
Fixes #44416.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/class-wp-comment-query.php

    r41686 r43819  
    634634        $offset = absint( $this->query_vars['offset'] );
    635635        $paged = absint( $this->query_vars['paged'] );
     636        $limits = '';
    636637
    637638        if ( ! empty( $number ) ) {
     
    818819        }
    819820
    820         $join = '';
     821        $join    = '';
     822        $groupby = '';
    821823
    822824        if ( $join_posts_table ) {
Note: See TracChangeset for help on using the changeset viewer.