From a02d4c4a161a689111adac16e6fa702b30dea27b Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 5 Aug 2016 19:27:56 +0000 Subject: [PATCH] Update/Install: Replace "error" and "-1" failure messages with a more meaningful one. * "-1" is an invalid nonce error, show 'An error has occurred. Please reload the page and try again.'. * "error" means that the connection to the server was lost, show 'Connection lost or the server is busy. Please try again later.'. * Escape the message in `wp-updates-admin-notice` because the response may include HTML. * Remove HTML tags in `wp.updates.isValidResponse()` to make PHP's error messages more readable. Props azaozz for review. Fixes #37583. git-svn-id: https://develop.svn.wordpress.org/trunk@38205 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update.php | 2 +- src/wp-admin/js/updates.js | 8 +++++++- src/wp-includes/script-loader.php | 2 ++ tests/qunit/fixtures/updates.js | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 74899e37cb..3bc11d8954 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -631,7 +631,7 @@ function maintenance_nag() { function wp_print_admin_notice_templates() { ?>