#7568 closed defect (bug) (fixed)
Avoid passing WP_Comment object to `is_email()` when filtering avatar URL
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
Comments by anonymous comment authors (i.e. without a user account) fall through the current logic in bp_core_get_avatar_data_url_filter
and the WP_Comment
object is passed to is_email()
which expects a string - and therefore throws a PHP Warning: "strlen() expects parameter 1 to be string".
Attachments (2)
Change History (7)
#2
@
8 years ago
- Keywords has-patch added; needs-patch removed
Oops, didn't see your patch there, @needle! Same as mine :)
Will commit in the next hour.
#4
@
8 years ago
- Owner set to r-a-y
- Resolution set to fixed
- Status changed from new to closed
In 11638:
This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.
8 years ago
Note: See
TracTickets for help on using
tickets.
Ugh. Good catch.
I hate that we have to do our own user checking in the
'get_avatar_url'
filter. WordPress shouldn't make us have to do that.