Skip to:
Content

Opened 2 years ago

Closed 21 months ago

Last modified 18 months ago

#4215 closed enhancement (fixed)

bp_core_fetch_avatar html pref checking should use !empty

Reported by: 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 2 years ago.
proposed fix

Download all attachments as: .zip

Change History (11)

magnus782 years ago

proposed fix

comment:1 boonebgorges2 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&...)

comment:2 boonebgorges2 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

comment:4 DJPaul21 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 DJPaul21 months ago

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

comment:7 boonebgorges21 months 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

comment:8 boonebgorges21 months 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

comment:9 boonebgorges21 months 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).

comment:10 magnus7818 months ago

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