WordPress.org

Make WordPress Core

Changeset 46185


Ignore:
Timestamp:
09/19/2019 02:29:30 PM (8 weeks ago)
Author:
desrosj
Message:

PHP 7.4: Fix another instance of array access on a datatype that cannot be accessed as an array.

PHP 7.4 adds a warning when trying access a null/bool/int/float/resource (everything but array, string and object) as if it were an array.

Follow up of [45639].

Props desrosj, jrf.
See #47704.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update.php

    r45932 r46185  
    708708         */
    709709        $comparison = ! empty( $failed['critical'] ) ? '>=' : '>';
    710         if ( version_compare( $failed['attempted'], $wp_version, $comparison ) ) {
     710        if ( isset( $failed['attempted'] ) && version_compare( $failed['attempted'], $wp_version, $comparison ) ) {
    711711            $nag = true;
    712712        }
Note: See TracChangeset for help on using the changeset viewer.