From 9a2ca4bcf5a09b8f8f0674e87ef1448d394b5a36 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 20 Sep 2019 22:23:58 +0000 Subject: [PATCH] Code Modernization: Remove a workaround for `CURLOPT_PROTOCOLS` in `WP_Http_Curl::request()`. The `CURLOPT_PROTOCOLS` constant was introduced in PHP 5.2.10, so no longer needs a workaround. Props jrf. See #48074. Built from https://develop.svn.wordpress.org/trunk@46218 git-svn-id: http://core.svn.wordpress.org/trunk@46030 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-http-curl.php | 4 +--- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-http-curl.php b/wp-includes/class-wp-http-curl.php index c331f05d88..a49db80fbb 100644 --- a/wp-includes/class-wp-http-curl.php +++ b/wp-includes/class-wp-http-curl.php @@ -143,9 +143,7 @@ class WP_Http_Curl { * a bug #17490 with redirected POST requests, so handle redirections outside Curl. */ curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, false ); - if ( defined( 'CURLOPT_PROTOCOLS' ) ) { // PHP 5.2.10 / cURL 7.19.4 - curl_setopt( $handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS ); - } + curl_setopt( $handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS ); switch ( $parsed_args['method'] ) { case 'HEAD': diff --git a/wp-includes/version.php b/wp-includes/version.php index e6f889218c..895b2bfd5e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46217'; +$wp_version = '5.3-alpha-46218'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.