Make WordPress Core


Ignore:
Timestamp:
08/05/2016 07:27:56 PM (8 years ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r38203 r38205  
    678678                'activateImporterLabel'      => __( 'Run %s' ),
    679679                'unknownError'               => __( 'An unknown error occurred' ),
     680                'connectionError'            => __( 'Connection lost or the server is busy. Please try again later.' ),
     681                'nonceError'                 => __( 'An error has occurred. Please reload the page and try again.' ),
    680682                'pluginsFound'               => __( 'Number of plugins found: %d' ),
    681683                'noPluginsFound'             => __( 'No plugins found. Try a different search.' ),
Note: See TracChangeset for help on using the changeset viewer.