Make WordPress Core


Ignore:
Timestamp:
07/15/2019 06:24:08 AM (5 years ago)
Author:
pento
Message:

Code Modernisation: Fix known instances of array access on data types that can't be accessed as arrays.

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

This change fixes all of these warnings visible in unit tests.

Props jrf.
See #47704.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r45494 r45639  
    50995099                    'section'       => 'title_tagline',
    51005100                    'priority'      => 8,
    5101                     'height'        => $custom_logo_args[0]['height'],
    5102                     'width'         => $custom_logo_args[0]['width'],
    5103                     'flex_height'   => $custom_logo_args[0]['flex-height'],
    5104                     'flex_width'    => $custom_logo_args[0]['flex-width'],
     5101                    'height'        => isset( $custom_logo_args[0]['height'] ) ? $custom_logo_args[0]['height'] : null,
     5102                    'width'         => isset( $custom_logo_args[0]['width'] ) ? $custom_logo_args[0]['width'] : null,
     5103                    'flex_height'   => isset( $custom_logo_args[0]['flex-height'] ) ? $custom_logo_args[0]['flex-height'] : null,
     5104                    'flex_width'    => isset( $custom_logo_args[0]['flex-width'] ) ? $custom_logo_args[0]['flex-width'] : null,
    51055105                    'button_labels' => array(
    51065106                        'select'       => __( 'Select logo' ),
Note: See TracChangeset for help on using the changeset viewer.