Opened 6 years ago
Closed 6 years ago
#8254 closed defect (bug) (fixed)
Undefined `$current_blog` in function `bp_core_delete_existing_avatar`
| Reported by: | itowhid06 | Owned by: | imath |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.0.0 |
| Component: | Core | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: |
Description
Undefined $current_blog in function bp_core_delete_existing_avatar
Attachments (2)
Change History (9)
#1
@
6 years ago
- Keywords reporter-feedback added
- Milestone Awaiting Review → 6.0.0
- Owner set to
- Status new → assigned
#2
@
6 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
@
6 years ago
I believe it's best to use the function get_current_blog_id(). What do you think ?
#5
in reply to: ↑ 4
@
6 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 ?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @itowhid06
Thanks for your feedback and patch. Out of curiosity how did you find the issue ?