[wp-trac] [WordPress Trac] #29692: Multisite create new site return fatal error

WordPress Trac noreply at wordpress.org
Wed Nov 5 05:11:39 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    |     Focuses:  administration, multisite
--------------------------------+----------------------------------------
Changes (by jeremyfelt):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"30242"]:
 {{{
 #!CommitTicketReference repository="" revision="30242"
 Create new $wp_roles object in install_blog() to avoid protected _init()
 call

 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.

 Fixes #29692 for trunk.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29692#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list