I18N: In `get_translations_for_domain()` check if the global `$l10n` was set by `_load_textdomain_just_in_time()` before accessing it.

Props danielhuesken.
Fixes #34114.
Built from https://develop.svn.wordpress.org/trunk@37440


git-svn-id: http://core.svn.wordpress.org/trunk@37406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-05-16 15:10:29 +00:00
parent 1ae8891261
commit a673a71f94
2 changed files with 2 additions and 2 deletions

View File

@ -848,7 +848,7 @@ function _load_textdomain_just_in_time( $domain ) {
*/
function get_translations_for_domain( $domain ) {
global $l10n;
if ( isset( $l10n[ $domain ] ) || _load_textdomain_just_in_time( $domain ) ) {
if ( isset( $l10n[ $domain ] ) || ( _load_textdomain_just_in_time( $domain ) && isset( $l10n[ $domain ] ) ) ) {
return $l10n[ $domain ];
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37439';
$wp_version = '4.6-alpha-37440';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.