WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/14/2018 05:12:12 AM (2 years ago)
Author:
desrosj
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.

Props jorbin, desrosj.

Merges [43819] and [43832] to trunk.

Fixes #44416.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/class-wp-network-query.php

    r42876 r44166  
    328328        $number = absint( $this->query_vars['number'] );
    329329        $offset = absint( $this->query_vars['offset'] );
     330        $limits = '';
    330331
    331332        if ( ! empty( $number ) ) {
     
    392393
    393394        $where = implode( ' AND ', $this->sql_clauses['where'] );
     395
     396        $groupby = '';
    394397
    395398        $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
Note: See TracChangeset for help on using the changeset viewer.