Skip to:
Content

BuddyPress.org

Ticket #8177: bp-core-avatars.patch

File bp-core-avatars.patch, 635 bytes (added by shanebp, 5 years ago)
  • src/bp-core/bp-core-avatars.php

     src/bp-core/bp-core-avatars.php | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/src/bp-core/bp-core-avatars.php b/src/bp-core/bp-core-avatars.php
    index 5eb8823e6..fbb1a027e 100644
    a b add_action( 'bp_setup_globals', 'bp_core_set_avatar_globals' ); 
    192192function bp_core_fetch_avatar( $args = '' ) {
    193193        $bp = buddypress();
    194194
     195        // If $bp->avatar doesn't exist yet, bail.
     196        if ( ! $bp->avatar ) {
     197                return;
     198        }
     199
    195200        // If avatars are disabled for the root site, obey that request and bail.
    196201        if ( ! $bp->avatar->show_avatars ) {
    197202                return;