Skip to:
Content

BuddyPress.org

Changeset 12942


Ignore:
Timestamp:
05/08/2021 02:15:48 PM (4 years ago)
Author:
imath
Message:

Avatars: In case of error while shrinking image use the unshrinked one

Props woahmazing

See #8469 (7.0 branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/7.0/src/bp-core/bp-core-avatars.php

    r12588 r12942  
    930930
    931931    // We only want to handle one image after resize.
    932     if ( empty( $bp->avatar_admin->resized ) ) {
     932    if ( empty( $bp->avatar_admin->resized ) || is_wp_error( $bp->avatar_admin->resized ) ) {
    933933        $bp->avatar_admin->image->file = $bp->avatar_admin->original['file'];
    934934        $bp->avatar_admin->image->dir  = str_replace( $upload_path, '', $bp->avatar_admin->original['file'] );
Note: See TracChangeset for help on using the changeset viewer.