From 3fd7c7eba1254727d64b44594cddda126862bcb9 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 23 Aug 2016 15:55:31 +0000 Subject: [PATCH] Requests: Update to Requests master (fb5b517) which corrects a logic inversion in the cURL transport checks. Previously if a host had only disabled one of `curl_init()` or `curl_exec()` it wouldn't get detected correctly by Requests, which caused cURL warnings for users on an affected host. Merge of [38274] to the 4.6 branch. Fixes #37700. Built from https://develop.svn.wordpress.org/branches/4.6@38338 git-svn-id: http://core.svn.wordpress.org/branches/4.6@38279 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/Requests/Transport/cURL.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/Requests/Transport/cURL.php b/wp-includes/Requests/Transport/cURL.php index 453f73b730..7979b2eba0 100644 --- a/wp-includes/Requests/Transport/cURL.php +++ b/wp-includes/Requests/Transport/cURL.php @@ -347,7 +347,7 @@ class Requests_Transport_cURL implements Requests_Transport { default: curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']); if (!empty($data)) { - curl_setopt( $this->handle, CURLOPT_POSTFIELDS, $data ); + curl_setopt($this->handle, CURLOPT_POSTFIELDS, $data); } } @@ -524,7 +524,7 @@ class Requests_Transport_cURL implements Requests_Transport { * @return boolean True if the transport is valid, false otherwise. */ public static function test($capabilities = array()) { - if (!function_exists('curl_init') && !function_exists('curl_exec')) { + if (!function_exists('curl_init') || !function_exists('curl_exec')) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index be889248ad..99cc200c0d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6.1-alpha-38287'; +$wp_version = '4.6.1-alpha-38338'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.