Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#4215 closed enhancement (fixed)

bp_core_fetch_avatar html pref checking should use !empty

Reported by: magnus78's profile magnus78 Owned by:
Milestone: 1.6.1 Priority: normal
Severity: critical Version:
Component: Core Keywords: has-patch
Cc: magnus.melin@…

Description

When bp_core_fetch_avatar checks the html pref it checks it using true === $html. This makes it harder then necessary to override (e.g. passing $html=0 won't work). I propose to use !empty instead.

Attachments (1)

trac4215_avatar_html_pref.patch (798 bytes) - added by magnus78 12 years ago.
proposed fix

Download all attachments as: .zip

Change History (11)

@magnus78
12 years ago

proposed fix

#1 @boonebgorges
12 years ago

  • Milestone changed from Awaiting Review to 1.6
  • Priority changed from normal to low
  • Type changed from defect (bug) to enhancement

Agreed. This makes it unnecessarily hard to pass arguments in a URL style (...&html=1&...)

#2 @boonebgorges
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6046]) Eases up on type checks when passing an 'html' param to bp_core_fetch_avatar().

Fixes #4215. Props magnus78

#4 @DJPaul
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#5 @DJPaul
12 years ago

Syntax that is being used seems to be: 'html' => 'false'

#7 @boonebgorges
12 years ago

(In [6246]) 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

#8 @boonebgorges
12 years ago

(In [6247]) 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

#9 @boonebgorges
12 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Dang it, referenced the wrong ticket number. Fixed in previous two commits (1.6.x and trunk).

#10 @magnus78
11 years ago

  • Cc magnus.melin@… added
Note: See TracTickets for help on using tickets.