Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/28/2020 09:21:09 PM (6 years ago)
Author:
boonebgorges
Message:

isset() checks for a variety of variable references.

This helps to avoid PHP notices in 7.4+.

See #8264.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-media-extractor.php

    r11303 r12602  
    826826                foreach ( $images as $image_id ) {
    827827                    $image  = wp_get_attachment_image_src( $image_id, $image_size );
     828
     829                    $image_url    = isset( $image[0] ) ? $image[0] : '';
     830                    $image_width  = isset( $image[1] ) ? $image[1] : '';
     831                    $image_height = isset( $image[2] ) ? $image[2] : '';
     832
    828833                    $data[] = array(
    829                         'url'    => $image[0],
    830                         'width'  => $image[1],
    831                         'height' => $image[2],
     834                        'url'    => $image_url,
     835                        'width'  => $image_width,
     836                        'height' => $image_height,
    832837
    833838                        'gallery_id' => 1 + $gallery_id,
Note: See TracChangeset for help on using the changeset viewer.