insert_blog() can possible return the wrong blog id when plugin/theme uses refresh_blog_details action
|Reported by:||feedmeastraycat||Owned by:||nacin|
The function insert_blog() returns $wpdb->insert_id after calling refresh_blog_details(). So if a plugin or theme is using the refresh_blog_details action and does something that changed $wpdb, the returned blog id will be wrong and WordPress creates table names with the wrong id in their name.
I understand if this isn't considered a bug. But I've attached a suggested patch anyway. I think it would be good.
Change History (8)
- Keywords has-patch commit added
- Milestone changed from Awaiting Review to 3.6
comment:2 SergeyBiryukov — 10 months ago
- Component changed from General to Multisite
- Version changed from trunk to 3.0
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed