Make WordPress Core


Ignore:
Timestamp:
12/14/2018 05:12:12 AM (6 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-site-query.php

    r43010 r44166  
    421421        $number = absint( $this->query_vars['number'] );
    422422        $offset = absint( $this->query_vars['offset'] );
     423        $limits = '';
    423424
    424425        if ( ! empty( $number ) ) {
     
    585586        $where = implode( ' AND ', $this->sql_clauses['where'] );
    586587
     588        $groupby = '';
     589
    587590        $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
    588591
Note: See TracChangeset for help on using the changeset viewer.