diff --git a/wp-includes/user.php b/wp-includes/user.php index 4c14aa6451..d0b760986c 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -2217,6 +2217,10 @@ function wp_get_password_hint() { function get_password_reset_key( $user ) { global $wpdb, $wp_hasher; + if ( ! ( $user instanceof WP_User ) ) { + return new WP_Error( 'invalidcombo', __( 'ERROR: There is no account with that username or email address.' ) ); + } + /** * Fires before a new password is retrieved. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 038fdf8325..beb08a0cb9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-beta1-44601'; +$wp_version = '5.1-beta1-44602'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.