Make WordPress Core

Changeset 35782


Ignore:
Timestamp:
12/06/2015 06:23:18 PM (9 years ago)
Author:
jeremyfelt
Message:

MS: Populate public on empty $current_blog during subdomain activation.

Activation of a subdomain site is done through that new site's address. This address does not exist in the wp_blogs table until activation is complete.

In this case we need to make sure public is populated to avoid a PHP notice.

Props uglyrobot.
Fixes #24760.

File:
1 edited

Legend:

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

    r34828 r35782  
    136136    }
    137137
    138     // @todo Investigate when exactly this can occur.
     138    // During activation of a new subdomain, the requested site does not yet exist.
    139139    if ( empty( $current_blog ) && wp_installing() ) {
    140140        $current_blog = new stdClass;
    141141        $current_blog->blog_id = $blog_id = 1;
     142        $current_blog->public = 1;
    142143    }
    143144
Note: See TracChangeset for help on using the changeset viewer.