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. See #45668. Built from https://develop.svn.wordpress.org/branches/5.0@44284 git-svn-id: http://core.svn.wordpress.org/branches/5.0@44114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d8015373f9
commit
9fd568fab8
|
@ -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'] );
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0.2-RC1-44259';
|
||||
$wp_version = '5.0.2-RC1-44284';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue