Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/12/2017 06:21:08 PM (2 years ago)
Author:
r-a-y
Message:

Avatars: After r11627, fix notices appearing for anonymous commenters.

Props needle. See #7424.

Fixes #7568.

File:
1 edited

Legend:

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

    r11633 r11638  
    13841384        // Post Object
    13851385        $user = get_user_by( 'id', (int) $id_or_email->post_author );
    1386     } elseif ( $id_or_email instanceof WP_Comment && ! empty( $id_or_email->user_id ) ) {
    1387         $user = get_user_by( 'id', (int) $id_or_email->user_id );
     1386    } elseif ( $id_or_email instanceof WP_Comment ) {
     1387        if ( ! empty( $id_or_email->user_id ) ) {
     1388            $user = get_user_by( 'id', (int) $id_or_email->user_id );
     1389        }
    13881390    } elseif ( is_email( $id_or_email ) ) {
    13891391        $user = get_user_by( 'email', $id_or_email );
Note: See TracChangeset for help on using the changeset viewer.