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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37440 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2016-05-16 15:09:33 +00:00
parent a595b2ff53
commit 999af2444c
2 changed files with 16 additions and 1 deletions
+1 -1
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 ];
}