[wp-trac] [WordPress Trac] #23405: blog-details cache can get stuck with bad value
WordPress Trac
noreply at wordpress.org
Sat Mar 2 20:57:52 UTC 2013
#23405: blog-details cache can get stuck with bad value
--------------------------+--------------------
Reporter: westi | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6
Component: Multisite | Version: 3.5.1
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Changes (by beezeee):
* keywords: needs-patch => has-patch
Comment:
The above patch seems to do the job, the test below confirms:
{{{
<?php
require_once('./wp-load.php');
global $wpdb;
$next_id = $wpdb->get_var(
"SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE
TABLE_SCHEMA = '".DB_NAME."' "
." AND TABLE_NAME = '{$wpdb->blogs}'"
);
echo '<pre>';
echo "Next blog id to be added $next_id \n\n";
echo "get_blog_details(1): \n\n";
echo var_export(get_blog_details(1))."\n\n";
echo "get_blog_details($next_id): \n";
echo var_export(get_blog_details($next_id))."\n\n";
$new_blog = wpmu_create_blog(get_bloginfo('domain'), 'secondblog', 'Second
Blog',
1);
echo "added blog $new_blog and refresh_blog_details($new_blog) \n\n";
refresh_blog_details($new_blog);
echo "get_blog_details($next_id) \n\n";
echo var_export(get_blog_details($next_id))."\n\n";
echo "cleaning up \n\n";
wpmu_delete_blog($new_blog, true);
echo '</pre>';
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23405#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list