[wp-trac] [WordPress Trac] #38535: Don't init WP_Locale_Switcher in wp_load_translations_early()

WordPress Trac noreply at wordpress.org
Sat Oct 29 11:22:52 UTC 2016


#38535: Don't init WP_Locale_Switcher in wp_load_translations_early()
--------------------------+----------------------
 Reporter:  ocean90       |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  closed
 Priority:  high          |   Milestone:  4.7
Component:  I18N          |     Version:  trunk
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+----------------------
Changes (by ocean90):

 * owner:   => ocean90
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"39005"]:
 {{{
 #!CommitTicketReference repository="" revision="39005"
 I18N: Don't initialize `WP_Locale_Switcher` in
 `wp_load_translations_early()`.

 `wp_load_translations_early()` is used when WordPress isn't fully
 initialized. Therefore using the `WP_Locale_Switcher` with
 `get_locale()`/`get_user_locale()` can cause PHP fatal errors.
 This reverts [38976] and [38977], and instead removes `WP_Locale_Switcher`
 from `wp_load_translations_early()`.

 See #29783.
 Fixes #38535.
 }}}

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


More information about the wp-trac mailing list