Make WordPress Core

Changeset 23752


Ignore:
Timestamp:
03/19/2013 05:05:19 AM (12 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-blogs.php

    r23686 r23752  
    253253    $blog_id = (int) $blog_id;
    254254    $details = get_blog_details( $blog_id, false );
     255    if ( ! $details ) {
     256        // Make sure clean_blog_cache() gets the blog ID
     257        // when the blog has been previously cached as
     258        // non-existent.
     259        $details = (object) array(
     260            'blog_id' => $blog_id,
     261            'domain' => null,
     262            'path' => null
     263        );
     264    }
    255265
    256266    clean_blog_cache( $details );
Note: See TracChangeset for help on using the changeset viewer.