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:
Dominik Schilling 2016-11-04 17:15:26 +00:00
parent 6ccb29bee0
commit abada1fbdc
2 changed files with 2 additions and 2 deletions

View File

@ -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 );
}

View File

@ -4,7 +4,7 @@
*
* @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.