In refresh_blog_details(), make sure clean_blog_cache() gets the blog ID when the blog has been previously cached as non-existent. This ensures that -1 values in blog-details are cleared after blogs are created.
Props beezeee, hirozed fixes #23405 git-svn-id: http://core.svn.wordpress.org/trunk@23752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9d9d86eea8
commit
57b2fc1c04
|
@ -252,6 +252,16 @@ function get_blog_details( $fields = null, $get_all = true ) {
|
||||||
function refresh_blog_details( $blog_id ) {
|
function refresh_blog_details( $blog_id ) {
|
||||||
$blog_id = (int) $blog_id;
|
$blog_id = (int) $blog_id;
|
||||||
$details = get_blog_details( $blog_id, false );
|
$details = get_blog_details( $blog_id, false );
|
||||||
|
if ( ! $details ) {
|
||||||
|
// Make sure clean_blog_cache() gets the blog ID
|
||||||
|
// when the blog has been previously cached as
|
||||||
|
// non-existent.
|
||||||
|
$details = (object) array(
|
||||||
|
'blog_id' => $blog_id,
|
||||||
|
'domain' => null,
|
||||||
|
'path' => null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
clean_blog_cache( $details );
|
clean_blog_cache( $details );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue