Making WordPress.org


Ignore:
Timestamp:
01/30/2018 05:40:49 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: API: rejig how the error handling in [6463] is handled - The old behaviour is now only present if the constant is defined as false.

See #111

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api.php

    r6463 r6464  
    8585
    8686        // Backwards compatibility; the API returns null in case of error..
    87         if ( isset( $response['error'] ) && ( ! defined( 'PLUGINS_API_SUPPORTS_ERRORS' ) || ! PLUGINS_API_SUPPORTS_ERRORS ) ) {
     87        // This is now feature-flagged by the PLUGINS_API_SUPPORTS_ERRORS constant which is defined as `true` in info/1.2 and later.
     88        if ( isset( $response['error'] ) && ( defined( 'PLUGINS_API_SUPPORTS_ERRORS' ) && ! PLUGINS_API_SUPPORTS_ERRORS ) ) {
    8889            $this->output( null );
    8990            return;
Note: See TracChangeset for help on using the changeset viewer.