[wp-trac] [WordPress Trac] #45235: REST API: Setting _locale can cause fatal errors

WordPress Trac noreply at wordpress.org
Wed Oct 31 01:01:42 UTC 2018


#45235: REST API: Setting _locale can cause fatal errors
--------------------------+-------------------------
 Reporter:  pento         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  high          |  Milestone:  5.0
Component:  I18N          |    Version:  5.0
 Severity:  major         |   Keywords:  needs-patch
  Focuses:  rest-api      |
--------------------------+-------------------------
 `determine_locale()` calls `is_user_logged_in()` when the `_locale`
 parameter is set in a REST API request.

 However, `is_user_logged_in()` is a pluggable function, which loads after
 plugins do, so if any plugins call `__()` as soon as they're loaded, it
 will cause a fatal error.

 Related: #44758, [43776].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45235>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list