From 5f4902605ecdf7915458915eacd7df5a80763066 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 4 Dec 2015 15:30:17 +0000 Subject: [PATCH] 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 --- src/wp-includes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 32b0ec7463..0abe79e7d2 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -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;