Opened 5 years ago
Closed 5 years ago
#8254 closed defect (bug) (fixed)
Undefined `$current_blog` in function `bp_core_delete_existing_avatar`
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch commit |
Cc: |
Description
Undefined $current_blog
in function bp_core_delete_existing_avatar
Attachments (2)
Change History (9)
#1
@
5 years ago
- Keywords reporter-feedback added
- Milestone changed from Awaiting Review to 6.0.0
- Owner set to imath
- Status changed from new to assigned
#2
@
5 years ago
Hi @imath
I am working on some BuddyPress integration code. I was looking into how BP is saving avatars and my Code Editor showed me this one. All credit goes to the CE :)
#4
follow-up:
↓ 5
@
5 years ago
I believe it's best to use the function get_current_blog_id()
. What do you think ?
#5
in reply to:
↑ 4
@
5 years ago
Yes, that is better. Using $current_blog->id
should be avoided in all possible cases, and I just created the patch to keep similarity with other usages. +1 to https://buddypress.trac.wordpress.org/attachment/ticket/8254/8254.2.patch.
Replying to imath:
I believe it's best to use the function
get_current_blog_id()
. What do you think ?
Hi @itowhid06
Thanks for your feedback and patch. Out of curiosity how did you find the issue ?