Skip to:
Content

Changeset 6247


Ignore:
Timestamp:
08/08/12 16:38:43 (21 months ago)
Author:
boonebgorges
Message:

Do a strict type check for 'html' parameter in bp_core_fetch_avatar()

In r6046, the type check was loosened, to make it somewhat easier for themers
to pass a false value for 'html'. However, it was found after the 1.6 release
that this change broke backward compatibility with certain ways of calling
bp_core_fetch_avatar(). See #4215 for info on the original change.

Fixes #6046

Props rogercoathup

File:
1 edited

Legend:

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

    r6228 r6247  
    314314 
    315315            // Return it wrapped in an <img> element 
    316             if ( !empty( $html ) ) { 
     316            if ( true === $html ) { 
    317317                return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $avatar_url . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir ); 
    318318 
     
    376376    } 
    377377 
    378     if ( !empty( $html ) ) 
     378    if ( true === $html ) 
    379379        return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir ); 
    380380    else 
Note: See TracChangeset for help on using the changeset viewer.