I18N: In get_user_locale()
ensure that $user_id
isn't a falsy value before calling get_user_by()
.
Fixes #38485. git-svn-id: https://develop.svn.wordpress.org/trunk@39134 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ed37aaa664
commit
ece3b68aaf
@ -92,7 +92,7 @@ function get_user_locale( $user_id = 0 ) {
|
||||
$user = wp_get_current_user();
|
||||
} elseif ( $user_id instanceof WP_User ) {
|
||||
$user = $user_id;
|
||||
} elseif ( is_numeric( $user_id ) ) {
|
||||
} elseif ( $user_id && is_numeric( $user_id ) ) {
|
||||
$user = get_user_by( 'id', $user_id );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user