Skip to:
Content

BuddyPress.org

Changeset 12943


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

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

Props woahmazing

Fixes #8469 (Trunk)

File:
1 edited

Legend:

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

    r12906 r12943  
    980980
    981981    // We only want to handle one image after resize.
    982     if ( empty( $bp->avatar_admin->resized ) ) {
     982    if ( empty( $bp->avatar_admin->resized ) || is_wp_error( $bp->avatar_admin->resized ) ) {
    983983        $bp->avatar_admin->image->file = $bp->avatar_admin->original['file'];
    984984        $bp->avatar_admin->image->dir  = str_replace( $upload_path, '', $bp->avatar_admin->original['file'] );
Note: See TracChangeset for help on using the changeset viewer.