[wp-trac] [WordPress Trac] #40279: switch_to_blog() and restore_current_blog() gives a fatal error in a multisite

WordPress Trac noreply at wordpress.org
Mon Mar 27 18:53:33 UTC 2017


#40279: switch_to_blog() and restore_current_blog() gives a fatal error in a
multisite
--------------------------------+------------------------
 Reporter:  KestutisIT          |       Owner:
     Type:  defect (bug)        |      Status:  closed
 Priority:  normal              |   Milestone:
Component:  Networks and Sites  |     Version:
 Severity:  normal              |  Resolution:  invalid
 Keywords:                      |     Focuses:  multisite
--------------------------------+------------------------
Changes (by ocean90):

 * status:  new => closed
 * version:  4.7.3 =>
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Hello @KestutisIT, thanks for your report.

 `switch_to_blog()` is defined in `wp-includes/ms-blogs.php` which is only
 loaded if the current install is a multisite install.
 If you have a plugin that is only useful for multisite installs you should
 check that appropriately and prevent an activation.

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


More information about the wp-trac mailing list