Make WordPress Core

Changeset 44297 for trunk


Ignore:
Timestamp:
12/18/2018 09:59:00 PM (6 years ago)
Author:
desrosj
Message:

PHP 7.3 Compatibility: Fix compact related 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. This fixes a few more instances of unset variables in the WordPress admin.

The full RFC can be viewed here: https://wiki.php.net/rfc/compact.

See #44416.

Merges [44185] into trunk.

Fixes #45483.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/includes/plugin-install.php

    r43571 r44297  
    428428    $url         = false;
    429429    $update_file = false;
     430    $version     = '';
    430431
    431432    /*
  • trunk/src/wp-admin/includes/post.php

    r44295 r44297  
    11001100
    11011101    $avail_post_stati = get_available_post_statuses( $post_type );
     1102    $post_status      = '';
     1103    $perm             = '';
    11021104
    11031105    if ( isset( $q['post_status'] ) && in_array( $q['post_status'], $post_stati ) ) {
     
    11051107        $perm        = 'readable';
    11061108    }
     1109
     1110    $orderby = '';
    11071111
    11081112    if ( isset( $q['orderby'] ) ) {
     
    11111115        $orderby = 'modified';
    11121116    }
     1117
     1118    $order = '';
    11131119
    11141120    if ( isset( $q['order'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.