I18N: In `get_user_locale()` ensure that `$user_id` isn't a falsy value before calling `get_user_by()`.
Fixes #38485. Built from https://develop.svn.wordpress.org/trunk@39134 git-svn-id: http://core.svn.wordpress.org/trunk@39074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6ccb29bee0
commit
abada1fbdc
|
@ -92,7 +92,7 @@ function get_user_locale( $user_id = 0 ) {
|
||||||
$user = wp_get_current_user();
|
$user = wp_get_current_user();
|
||||||
} elseif ( $user_id instanceof WP_User ) {
|
} elseif ( $user_id instanceof WP_User ) {
|
||||||
$user = $user_id;
|
$user = $user_id;
|
||||||
} elseif ( is_numeric( $user_id ) ) {
|
} elseif ( $user_id && is_numeric( $user_id ) ) {
|
||||||
$user = get_user_by( 'id', $user_id );
|
$user = get_user_by( 'id', $user_id );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-beta1-39133';
|
$wp_version = '4.7-beta1-39134';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue