Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4215 closed enhancement (fixed)

bp_core_fetch_avatar html pref checking should use !empty

Reported by: magnus78 Owned by:
Priority: normal Milestone: 1.6.1
Component: Core Version:
Severity: critical 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 14 years ago.
proposed fix

Download all attachments as: .zip

Change History (11)

@magnus78
14 years ago

proposed fix

#1 @boonebgorges
14 years ago

  • Milestone Awaiting Review1.6
  • Priority normallow
  • Type defect (bug)enhancement

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

#2 @boonebgorges
14 years ago

  • Resolutionfixed
  • Status newclosed

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

Fixes #4215. Props magnus78

#4 @DJPaul
14 years ago

  • Resolution fixed
  • Status closedreopened

#5 @DJPaul
14 years ago

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

#7 @boonebgorges
14 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
14 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
14 years ago

  • Resolutionfixed
  • Status reopenedclosed

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

#10 @magnus78
14 years ago

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