From 285d17c8a5acf9924a81d04700ee6dc5834f7e51 Mon Sep 17 00:00:00 2001 From: ocean90 Date: Wed, 13 Jul 2016 15:44:29 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@38053 git-svn-id: http://core.svn.wordpress.org/trunk@37994 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-requests.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-requests.php b/wp-includes/class-requests.php index f5aced060a..5efdca8d1f 100644 --- a/wp-includes/class-requests.php +++ b/wp-includes/class-requests.php @@ -323,7 +323,7 @@ public static function patch($url, $headers, $data = array(), $options = array() * for Basic authentication * (Requests_Auth|array|boolean, default: false) * - `proxy`: Proxy details to use for proxy by-passing and authentication - * (Requests_Proxy|array|boolean, default: false) + * (Requests_Proxy|array|string|boolean, default: false) * - `max_bytes`: Limit for the response body size. * (integer|boolean, default: false) * - `idn`: Enable IDN parsing @@ -575,7 +575,7 @@ protected static function set_defaults(&$url, &$headers, &$data, &$type, &$optio $options['auth']->register($options['hooks']); } - if (!empty($options['proxy'])) { + if (is_string($options['proxy']) || is_array($options['proxy'])) { $options['proxy'] = new Requests_Proxy_HTTP($options['proxy']); } if ($options['proxy'] !== false) { diff --git a/wp-includes/version.php b/wp-includes/version.php index af3348fd3b..3ffda2fb2c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-beta2-38052'; +$wp_version = '4.6-beta2-38053'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.