mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Handle null user ID in the WP_User constructor. Props kawauso. fixes #17894
git-svn-id: https://develop.svn.wordpress.org/trunk@18598 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1d3e616495
commit
9e2aa32657
@ -440,7 +440,7 @@ class WP_User {
|
||||
* @return WP_User
|
||||
*/
|
||||
function __construct( $id = 0, $name = '', $blog_id = '' ) {
|
||||
if ( ! is_numeric( $id ) ) {
|
||||
if ( ! empty( $id ) && ! is_numeric( $id ) ) {
|
||||
$name = $id;
|
||||
$id = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user