WordPress.org

Make WordPress Core

Ticket #21143: 21143_2.diff

File 21143_2.diff, 949 bytes (added by jamescollins, 19 months ago)
  • ms-settings.php

     
    4949        if ( ! isset( $current_site->blog_id ) ) 
    5050                $current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s", $current_site->domain, $current_site->path ) ); 
    5151 
     52        $blogname = null; 
    5253        if ( is_subdomain_install() ) { 
    5354                $current_blog = wp_cache_get( 'current_blog_' . $domain, 'site-options' ); 
    5455                if ( !$current_blog ) { 
     
    8081                unset($reserved_blognames); 
    8182        } 
    8283 
     84        if ( ! defined( 'WP_INSTALLING' ) && ! is_object( $current_blog ) ) { 
     85                do_action('blog_not_found', $domain, $path, $blogname, $current_site ); 
     86        } 
     87 
    8388        if ( ! defined( 'WP_INSTALLING' ) && is_subdomain_install() && ! is_object( $current_blog ) ) { 
    8489                if ( defined( 'NOBLOGREDIRECT' ) ) { 
    8590                        $destination = NOBLOGREDIRECT;