From 806002166b2e1a6ebb8e7e68d2337619c40dcc30 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 19 Mar 2013 05:05:19 +0000 Subject: [PATCH] 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: https://develop.svn.wordpress.org/trunk@23752 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/ms-blogs.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 7761e9007a..85ab51c345 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -252,6 +252,16 @@ function get_blog_details( $fields = null, $get_all = true ) { function refresh_blog_details( $blog_id ) { $blog_id = (int) $blog_id; $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 );