[wp-trac] [WordPress Trac] #29783: User Admin Language

WordPress Trac noreply at wordpress.org
Thu Oct 27 00:00:36 UTC 2016


#29783: User Admin Language
-------------------------------------------------+-------------------------
 Reporter:  faevilangel                          |       Owner:  ocean90
     Type:  feature request                      |      Status:  reopened
 Priority:  normal                               |   Milestone:  4.7
Component:  I18N                                 |     Version:  4.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests commit      |     Focuses:
  needs-dev-note                                 |  administration
-------------------------------------------------+-------------------------
Changes (by danielbachhuber):

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


Comment:

 This causes a fatal when WordPress can't connect to the database:

 {{{
 PHP   7. require_wp_db() /tmp/wp-cli-test-run-581135addf76f9.69107318/wp-
 settings.php:102
 PHP   8. wpdb->__construct() /tmp/wp-cli-test-run-581135addf76f9.69107318
 /wp-includes/load.php:403
 PHP   9. wpdb->db_connect() /tmp/wp-cli-test-run-581135addf76f9.69107318
 /wp-includes/wp-db.php:658
 PHP  10. wpdb->select() /tmp/wp-cli-test-run-581135addf76f9.69107318/wp-
 includes/wp-db.php:1615
 PHP  11. wp_load_translations_early() /tmp/wp-cli-test-run-
 581135addf76f9.69107318/wp-includes/wp-db.php:1098
 PHP  12. WP_Locale_Switcher->__construct() /tmp/wp-cli-test-run-
 581135addf76f9.69107318/wp-includes/load.php:920
 PHP  13. get_locale() /tmp/wp-cli-test-run-581135addf76f9.69107318/wp-
 includes/class-wp-locale-switcher.php:51
 PHP  14. get_option() /tmp/wp-cli-test-run-581135addf76f9.69107318/wp-
 includes/l10n.php:64
 }}}

 `get_locale()` / `get_option()` needs some form of fallback when `$wpdb`
 isn't initialized.

 Discovered in https://travis-ci.org/wp-cli/wp-cli/jobs/170935443

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


More information about the wp-trac mailing list