diff --git a/wp-includes/user.php b/wp-includes/user.php index 7bdc37cc76..56e6d082a5 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -1452,6 +1452,8 @@ function wp_update_user($userdata) { // First, get all of the original fields $user_obj = get_userdata( $ID ); + if ( ! $user_obj ) + return new WP_Error( 'invalid_user_id', __( 'Invalid user ID.' ) ); $user = $user_obj->to_array();