[wp-trac] [WordPress Trac] #24760: Creating default object from empty value in wp-includes/ms-settings.php on line 111
WordPress Trac
noreply at wordpress.org
Mon Jan 6 06:11:28 UTC 2014
#24760: Creating default object from empty value in wp-includes/ms-settings.php on
line 111
-------------------------------+----------------------
Reporter: conner_bw | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Multisite | Version: 3.0
Severity: normal | Resolution: invalid
Keywords: reporter-feedback |
-------------------------------+----------------------
Changes (by EllyTronic):
* cc: iwork@… (added)
Comment:
I just wanted to add in case anyone else comes here from Google looking
for an answer, I had the same problem and can tell you why you're having
it -- this is only tested with MU setup for subdomains.
You'll notice the activation email contains the address of the new site
followed by /wp-activate.php?key=xxxxxx
You are also probably running pro sites plugin or some WPMU plugin similar
to this where a user must do something "special" to activate the site --
in "Pro Sites" this usually means paying. Thus, because the site isn't
activated and doesn't yet exist in the DB, $current_blog is null. If you
have the user follow the link but remove their subdomain from the email,
it will work just fine.. I'm sure there's a better solution out there, but
I haven't found it yet. Hopefully this illuminates the problem though, as
it seems to be a popular one.
Replying to [ticket:24760 conner_bw]:
>
> Getting:
>
> ''Creating default object from empty value in wp-includes/ms-
settings.php on line 111''
>
> On MU signups.
>
> Line ~111 is:
>
> {{{
> if ( empty( $current_blog->site_id ) )
> $current_blog->site_id = 1;
> }}}
>
> Short version: Depending on caching system used, or if some plugin
"enhances" the signup procedure, $current_blog can be null.
>
> Would benefit from a patch similar to: [21815]
>
> Thank you for your consideration.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24760#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list