i18n: Prevent a PHP warning when a mu-plugin loads a textdomain.
`determine_locale()` accesses the `$pagenow` global, but this is set after mu-plugins are loaded, so we need to check that it's been set. Props swissspidy, azaozz. Merges [44284] to trunk. Fixes #45668. git-svn-id: https://develop.svn.wordpress.org/trunk@44317 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3d780791a3
commit
72405a0eba
@ -138,7 +138,7 @@ function determine_locale() {
|
||||
$determined_locale = get_user_locale();
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['wp_lang'] ) && 'wp-login.php' === $GLOBALS['pagenow'] ) {
|
||||
if ( ! empty( $_GET['wp_lang'] ) && ! empty( $GLOBALS['pagenow'] ) && 'wp-login.php' === $GLOBALS['pagenow'] ) {
|
||||
$determined_locale = sanitize_text_field( $_GET['wp_lang'] );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user