Opened 9 years ago
Closed 9 years ago
#34967 closed defect (bug) (fixed)
SHORTINIT and date_i18n: Call to undefined function _x()
Reported by: | djzone | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4.1 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Bootstrap/Load | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
When SHORTINIT is used together with date_i18n() wp-includes/l10n.php is not loaded, and results the following error:
Fatal error: Call to undefined function _x() in /wp-includes
/functions.php on line 178
The following code can be used to reproduce the error:
<?php define('SHORTINIT', true); require_once('./wp-load.php'); $now = date_i18n('Y-m-d H:i:s');
This bug appeared in 4.4, with 4.3.1 it worked fine.
I've tried to investigate what happend since 4.3.1 that causes this change, I've find out that it's neither wp-settings.php nor wp-load.php.
I believe a wp_load_translations_early() call somewhere has been moved since 4.3.1, but I could not find that in revision history :(
Attachments (1)
Change History (9)
Note: See
TracTickets for help on using
tickets.
Introduced in [35517].
SHORTINIT
bails earlier thanl10n.php
is loaded: tags/4.0/src/wp-settings.php#L101.