Opened 14 years ago
Closed 14 years ago
#2984 closed defect (bug) (fixed)
$current_blog is not updated during switch_to_blog()
Reported by: | wpmuguru | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | major |
Severity: | Version: | ||
Component: | Core | Keywords: | |
Cc: |
Description
I noted in some patches going through that $current_blog is being compared to BP_ROOT_BLOG. If a plugin calls switch_to_blog, the $current_blog object is not updated to reflect the switched blog. Instead $current_blog is the original unswitched blog.
It would be better to compare the blog id to $wpdb->blogid which is updated on switch to blog.
Change History (3)
Note: See
TracTickets for help on using
tickets.
(In [4107]) Audit of the use of ->blog_id to change to ->blogid where possible, to better account for switch_to_blog() use. Fixes #2984. Props wpmuguru