From d77042872ca991b7980903a24f37f038295c11de Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 19 Feb 2021 17:22:37 +0000 Subject: [PATCH] Users: Correctly display an error message after clicking the "Send Reset Link" button. The `addInlineNotice()` function expects a single string as a success or error message, not an array of strings. Follow-up to [50129]. Props audrasjb. Fixes #52573. git-svn-id: https://develop.svn.wordpress.org/trunk@50390 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index d1d27f704d..a6f4a21e45 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -5433,6 +5433,6 @@ function wp_ajax_send_password_reset() { sprintf( __( 'A password reset link was emailed to %s.' ), $user->display_name ) ); } else { - wp_send_json_error( $results ); + wp_send_json_error( $results->get_error_message() ); } }