WordPress.org

Make WordPress Core

Changeset 44185


Ignore:
Timestamp:
12/14/2018 04:31:30 PM (11 months 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.
Fixes #45483.

Location:
branches/5.0/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/includes/plugin-install.php

    r43029 r44185  
    395395    $url = false;
    396396    $update_file = false;
     397    $version = '';
    397398
    398399    /*
  • branches/5.0/src/wp-admin/includes/post.php

    r44047 r44185  
    10301030
    10311031    $avail_post_stati = get_available_post_statuses($post_type);
     1032    $post_status      = '';
     1033    $perm             = '';
    10321034
    10331035    if ( isset($q['post_status']) && in_array( $q['post_status'], $post_stati ) ) {
     
    10351037        $perm = 'readable';
    10361038    }
     1039
     1040    $orderby = '';
    10371041
    10381042    if ( isset( $q['orderby'] ) ) {
     
    10411045        $orderby = 'modified';
    10421046    }
     1047
     1048    $order = '';
    10431049
    10441050    if ( isset( $q['order'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.