WordPress.org

Make WordPress Core

Changeset 38053


Ignore:
Timestamp:
07/13/2016 03:43:02 PM (4 years ago)
Author:
ocean90
Message:

HTTP API: Update Requests.

Fixes an issue where you couldn't set a Requests_Proxy_HTTP object as a proxy setting.

See https://github.com/rmccue/Requests/pull/223.
See #37107, #33055.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-requests.php

    r37694 r38053  
    324324     *    (Requests_Auth|array|boolean, default: false)
    325325     * - `proxy`: Proxy details to use for proxy by-passing and authentication
    326      *    (Requests_Proxy|array|boolean, default: false)
     326     *    (Requests_Proxy|array|string|boolean, default: false)
    327327     * - `max_bytes`: Limit for the response body size.
    328328     *    (integer|boolean, default: false)
     
    576576        }
    577577
    578         if (!empty($options['proxy'])) {
     578        if (is_string($options['proxy']) || is_array($options['proxy'])) {
    579579            $options['proxy'] = new Requests_Proxy_HTTP($options['proxy']);
    580580        }
Note: See TracChangeset for help on using the changeset viewer.