From 1dd3ed4bd5bb6c48918c26f934fef89ef8a0550c Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 18 Aug 2016 03:48: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 affecte dhost. Fixes #37700 for trunk. Built from https://develop.svn.wordpress.org/trunk@38274 git-svn-id: http://core.svn.wordpress.org/trunk@38215 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 39bd655124..2529ba7a38 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38273'; +$wp_version = '4.7-alpha-38274'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.