wpmu_create_blog() breaks with multiple use
|Reported by:||wpmuguru||Owned by:|
MU Trac Ticket: http://trac.mu.wordpress.org/ticket/394
When using wpmu_create_blog() in wpmu-functions.php it will only work once. If called additional times the blog will be added to the wp_blogs table but its tables will not be created, resulting in an invalid state. This is caused by $wp_queries being set in-line in upgrade-schema.php while it must be updated before the second call to wpmu_create_blog(). This is solved by moving the initialization of $wp_queries into a function and calling it just before the tables are created (diff file attached).
Change History (21)
- Cc westi added
- Keywords needs-patch added
- Priority changed from normal to high