Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/28/2020 09:21:09 PM (5 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-attachment-cover-image.php

    r12588 r12602  
    7979
    8080        // File size is too big.
    81         if ( $file['size'] > $this->original_max_filesize ) {
     81        if ( isset( $file['size'] ) && ( $file['size'] > $this->original_max_filesize ) ) {
    8282            $file['error'] = 11;
    8383
    8484        // File is of invalid type.
    85         } elseif ( ! bp_attachments_check_filetype( $file['tmp_name'], $file['name'], bp_attachments_get_allowed_mimes( 'cover_image' ) ) ) {
     85        } elseif ( isset( $file['tmp_name'] ) && isset( $file['name'] ) && ! bp_attachments_check_filetype( $file['tmp_name'], $file['name'], bp_attachments_get_allowed_mimes( 'cover_image' ) ) ) {
    8686            $file['error'] = 12;
    8787        }
Note: See TracChangeset for help on using the changeset viewer.