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:
Dominik Schilling (ocean90) 2015-12-04 15:30:17 +00:00
parent 1035906de6
commit 5f4902605e

View File

@ -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;