mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 11:10:03 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@35782 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -135,10 +135,11 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) {
|
||||
ms_not_installed( $domain, $path );
|
||||
}
|
||||
|
||||
// @todo Investigate when exactly this can occur.
|
||||
// During activation of a new subdomain, the requested site does not yet exist.
|
||||
if ( empty( $current_blog ) && wp_installing() ) {
|
||||
$current_blog = new stdClass;
|
||||
$current_blog->blog_id = $blog_id = 1;
|
||||
$current_blog->public = 1;
|
||||
}
|
||||
|
||||
// No site has been found, bail.
|
||||
|
||||
Reference in New Issue
Block a user