Skip to:

Opened 13 years ago

Closed 13 years ago

#2984 closed defect (bug) (fixed)

$current_blog is not updated during switch_to_blog()

Reported by: wpmuguru's profile wpmuguru Owned by:
Milestone: 1.5 Priority: major
Severity: Version:
Component: Core Keywords:


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)

#1 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to 1.3

#2 @DJPaul
13 years ago

  • Priority changed from normal to major

#3 @boonebgorges
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(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

Note: See TracTickets for help on using tickets.