#4215 closed enhancement (fixed)
bp_core_fetch_avatar html pref checking should use !empty
| Reported by: |
|
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)
Change History (11)
comment:1
boonebgorges — 12 months 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
boonebgorges — 12 months ago
- Resolution set to fixed
- Status changed from new to closed
- Milestone changed from 1.6 to 1.6.1
- Priority changed from low to normal
- Severity changed from normal to critical
This change in 1.6 has broken, amongst other things, the Salutation theme. Many forum posts:
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/bp_core_fetch_avatar-issue-after-1-6-update/
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/after-update-to-1-6-profilimagebug/
http://buddypress.org/community/groups/installing-buddypress/forum/topic/what-happened-to-our-avatars/
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/weird-characters-showing-instead-of-avatar-picture-on-top-bar-after-installing-1-6-update/
comment:6
boonebgorges — 10 months ago
Crud.
comment:7
boonebgorges — 10 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
boonebgorges — 10 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
boonebgorges — 10 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
magnus78 — 7 months ago
- Cc magnus.melin@… added

proposed fix