From b5de2df420e0df78639ebbd2d142a510fa6254e6 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 5 Aug 2016 19:30:31 +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. Merge of [38205] to the 4.6 branch. Props azaozz for review. See #37583. Built from https://develop.svn.wordpress.org/branches/4.6@38206 git-svn-id: http://core.svn.wordpress.org/branches/4.6@38147 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/update.php | 2 +- wp-admin/js/updates.js | 8 +++++++- wp-admin/js/updates.min.js | 4 ++-- wp-includes/script-loader.php | 2 ++ wp-includes/version.php | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 74899e37cb..3bc11d8954 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -631,7 +631,7 @@ function maintenance_nag() { function wp_print_admin_notice_templates() { ?>