From 58bd8a48e6d8763395d224c9435c9af0c4ffca1f Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 23 Sep 2019 18:11:01 +0000 Subject: [PATCH] External Libraries: Fix PHP 7.4 compatibility issues in the Requests library. See: https://github.com/rmccue/Requests/compare/v1.7.0...3470169 Props jrf, jorbin, desrosj. See #47746. git-svn-id: https://develop.svn.wordpress.org/trunk@46258 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/Requests/Transport/fsockopen.php | 4 ++-- src/wp-includes/class-requests.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/Requests/Transport/fsockopen.php b/src/wp-includes/Requests/Transport/fsockopen.php index 21cb56d5ec..c7c61d3b13 100644 --- a/src/wp-includes/Requests/Transport/fsockopen.php +++ b/src/wp-includes/Requests/Transport/fsockopen.php @@ -150,7 +150,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { $options['hooks']->dispatch('fsockopen.remote_host_path', array(&$path, $url)); $request_body = ''; - $out = sprintf("%s %s HTTP/%.1f\r\n", $options['type'], $path, $options['protocol_version']); + $out = sprintf("%s %s HTTP/%.1F\r\n", $options['type'], $path, $options['protocol_version']); if ($options['type'] !== Requests::TRACE) { if (is_array($data)) { @@ -192,7 +192,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { $headers = Requests::flatten($headers); if (!empty($headers)) { - $out .= implode($headers, "\r\n") . "\r\n"; + $out .= implode("\r\n", $headers) . "\r\n"; } $options['hooks']->dispatch('fsockopen.after_headers', array(&$out)); diff --git a/src/wp-includes/class-requests.php b/src/wp-includes/class-requests.php index bb266189c1..ea1b868f53 100644 --- a/src/wp-includes/class-requests.php +++ b/src/wp-includes/class-requests.php @@ -88,7 +88,7 @@ class Requests { * * @var string */ - const VERSION = '1.7'; + const VERSION = '1.7-3470169'; /** * Registered transport classes