Reset Password: Add a missing new
operator for WP_Error
in get_password_reset_key()
.
Missed in [34923]. Fixes #34180. git-svn-id: https://develop.svn.wordpress.org/trunk@35764 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1035906de6
commit
5f4902605e
@ -1971,7 +1971,7 @@ function get_password_reset_key( $user ) {
|
||||
$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
|
||||
$key_saved = $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
|
||||
if ( false === $key_saved ) {
|
||||
return WP_Error( 'no_password_key_update', __( 'Could not save password reset key to database.' ) );
|
||||
return new WP_Error( 'no_password_key_update', __( 'Could not save password reset key to database.' ) );
|
||||
}
|
||||
|
||||
return $key;
|
||||
|
Loading…
Reference in New Issue
Block a user