Plugin Directory

Changeset 1687719


Ignore:
Timestamp:
06/29/2017 01:00:57 PM (9 years ago)
Author:
adtechmedia
Message:

fix wp 4.5 issue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • adtechmedia/trunk/adtechmedia-request.php

    r1684514 r1687719  
    491491
    492492            if ( isset( $response ) && ! ( $response instanceof WP_Error )
    493                 && isset( $response['http_response'] ) && $response['http_response']->get_status() !== 403
    494                 && isset( $response['body'] ) ) {
     493                && (
     494                    ( isset( $response['http_response'] ) && 403 !== $response['http_response']->get_status() ) // >=4.6
     495                    || ( isset( $response['response'] ) && 403 !== $response['response']['code'] ) // <=4.5
     496                ) && isset( $response['body'] ) ) {
    495497
    496498                if ( self::check_response( $response, $excepted_params ) ) {
Note: See TracChangeset for help on using the changeset viewer.