WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2016 03:09:33 PM (5 years ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/l10n.php

    r37416 r37440  
    849849function get_translations_for_domain( $domain ) {
    850850    global $l10n;
    851     if ( isset( $l10n[ $domain ] ) || _load_textdomain_just_in_time( $domain ) ) {
     851    if ( isset( $l10n[ $domain ] ) || ( _load_textdomain_just_in_time( $domain ) && isset( $l10n[ $domain ] ) ) ) {
    852852        return $l10n[ $domain ];
    853853    }
Note: See TracChangeset for help on using the changeset viewer.