From 1e15f01687a9165098e410270da29975c5be1757 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 18 Aug 2016 03:47:55 +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 affecte dhost. Fixes #37700 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@38274 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/Requests/Transport/cURL.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/Requests/Transport/cURL.php b/src/wp-includes/Requests/Transport/cURL.php index 453f73b730..7979b2eba0 100644 --- a/src/wp-includes/Requests/Transport/cURL.php +++ b/src/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; }