Make WordPress Core

Changeset 39134


Ignore:
Timestamp:
11/03/2016 11:05:34 PM (8 years ago)
Author:
ocean90
Message:

I18N: In get_user_locale() ensure that $user_id isn't a falsy value before calling get_user_by().

Fixes #38485.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/l10n.php

    r39127 r39134  
    9393    } elseif ( $user_id instanceof WP_User ) {
    9494        $user = $user_id;
    95     } elseif ( is_numeric( $user_id ) ) {
     95    } elseif ( $user_id && is_numeric( $user_id ) ) {
    9696        $user = get_user_by( 'id', $user_id );
    9797    }
Note: See TracChangeset for help on using the changeset viewer.