From abada1fbdc41cf0efb856c0c87d2673a82a5a5b0 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 4 Nov 2016 17:15:26 +0000 Subject: [PATCH] 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 --- wp-includes/l10n.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 0ad4e01ba7..4ae7e2d278 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -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 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 8bed6e0ab1..1220ded253 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.