Making WordPress.org


Ignore:
Timestamp:
06/11/2020 07:57:24 AM (4 years ago)
Author:
dd32
Message:

Official WP Events: Handle 404 responses from the Meetup API, rather than fataling.

Sometimes the Meetup.com API appears to return a 404, which has no json error body.
This change allows for null to be passed as the error data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/meetup/class-meetup-client.php

    r9875 r9958  
    345345     * Attempt to extract codes and messages from a suspected error response.
    346346     *
    347      * @param array $data          The data in the response body, parsed as an array.
     347     * @param array $data          The data in the response body, parsed as an array. May be null for HTTP errors such as 404's.
    348348     * @param int   $response_code Optional. The HTTP status code from the response.
    349349     *
    350350     * @return WP_Error
    351351     */
    352     protected function parse_error( array $data, $response_code = 0 ) {
     352    protected function parse_error( $data, $response_code = 0 ) {
    353353        $error = new WP_Error();
    354354
Note: See TracChangeset for help on using the changeset viewer.