[wp-trac] [WordPress Trac] #37607: get_site() does not return the current site when multisite is in a switched state

WordPress Trac noreply at wordpress.org
Tue Aug 9 16:20:00 UTC 2016


#37607: get_site() does not return the current site when multisite is in a switched
state
-------------------------------------------------+-------------------------
 Reporter:  jeremyfelt                           |       Owner:  jeremyfelt
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  4.6
Component:  Networks and Sites                   |     Version:  trunk
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit      |     Focuses:  multisite
  dev-reviewed                                   |
-------------------------------------------------+-------------------------
Changes (by jeremyfelt):

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


Comment:

 In [changeset:"38231"]:
 {{{
 #!CommitTicketReference repository="" revision="38231"
 Multisite: Use `get_current_blog_id()` in `get_site()` for current site.

 The global `$current_blog` is not switched in `switch_to_blog()` and can
 not be used to properly retrieve current switched site information.

 Merge of [38217] to the 4.6 branch.

 Props ocean90 for review.
 Fixes #37607.
 }}}

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


More information about the wp-trac mailing list