[wp-trac] [WordPress Trac] #29692: Multisite create new site return fatal error
WordPress Trac
noreply at wordpress.org
Thu Nov 6 08:08:01 UTC 2014
#29692: Multisite create new site return fatal error
-------------------------------------+-------------------------------------
Reporter: kkalvaa | Owner: jeremyfelt
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.0.1
Component: Networks and Sites | Version: 4.0
Severity: blocker | Resolution: fixed
Keywords: has-patch commit fixed- | Focuses: administration,
major | multisite
-------------------------------------+-------------------------------------
Changes (by nacin):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"30255"]:
{{{
#!CommitTicketReference repository="" revision="30255"
Create new $wp_roles object in install_blog() to avoid protected _init()
call
Merges [30242] to the 4.0 branch.
Our call to `$wp_roles->_init()` relied on the `__call()` method in
`WP_Roles` to handle the link to the protected method. This works back to
PHP 5.2.9, when a bug was fixed allowing access to protected methods
through this exact approach.
`install_blog()` needs a fresh `$wp_roles` object after `populate_roles()`
resets everything in its path. We can create this new object from scratch,
effectively doing the same thing with the call to `_init()` via the
constructor.
props jeremyfelt.
fixes #29692.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29692#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list