mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 09:10:06 +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:
@@ -327,6 +327,7 @@ class WP_Network_Query {
|
||||
|
||||
$number = absint( $this->query_vars['number'] );
|
||||
$offset = absint( $this->query_vars['offset'] );
|
||||
$limits = '';
|
||||
|
||||
if ( ! empty( $number ) ) {
|
||||
if ( $offset ) {
|
||||
@@ -392,6 +393,8 @@ class WP_Network_Query {
|
||||
|
||||
$where = implode( ' AND ', $this->sql_clauses['where'] );
|
||||
|
||||
$groupby = '';
|
||||
|
||||
$pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user