i'm trying to create blog within plugin, after look at the source code of wp-admin/wpmu-edit.php, i found out that wpmu_create_blog is the function to create blog. hence i test it with the simpliest form(with only one line in the plugin):
$blog_id = wpmu_create_blog("foo.com", '/something/', 'something blog', 2, '', $current_site->id);
my wpmu site is using foo.com/stuff/ format and there is a user with user id equal to 2. when i enable the plugin it gave me the following error:
Fatal error: Call to a member function init() on a non-object in C:\wpmu\wp-includes\wpmu-functions.php on line 1361
the blog is created, but with last update time equal to never and no users is for the blog.
please someone help me out!