Skip to content

Commit

Permalink
External Libraries: Fix PHP 7.4 compatibility issues in the Requests …
Browse files Browse the repository at this point in the history
…library.

See: WordPress/Requests@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
  • Loading branch information
desrosj committed Sep 23, 2019
1 parent c1d89f7 commit 58bd8a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/Requests/Transport/fsockopen.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function request($url, $headers = array(), $data = array(), $options = ar
$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)) {
Expand Down Expand Up @@ -192,7 +192,7 @@ public function request($url, $headers = array(), $data = array(), $options = ar
$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));
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Requests {
*
* @var string
*/
const VERSION = '1.7';
const VERSION = '1.7-3470169';

/**
* Registered transport classes
Expand Down

0 comments on commit 58bd8a4

Please sign in to comment.