External Libraries: Update the Requests library to version 2.0.11.
This is a maintenance release with two minor fixes to improve PHP 8.4 compatibility. References: - [https://github.com/WordPress/Requests/releases/tag/v2.0.11 Requests 2.0.11 release notes] - [https://github.com/WordPress/Requests/compare/v2.0.9...v2.0.11 Full list of changes in Requests 2.0.11] Follow-up to [56554], [54997], [55007], [55046], [55225], [55296], [55629]. Props swissspidy, jrf. Fixes #60838. Built from https://develop.svn.wordpress.org/trunk@57876 git-svn-id: http://core.svn.wordpress.org/trunk@57377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6d5d992cf1
commit
c7d9fc540e
|
@ -470,13 +470,19 @@ class Cookie {
|
||||||
* @param \WpOrg\Requests\Iri|null $origin URI for comparing cookie origins
|
* @param \WpOrg\Requests\Iri|null $origin URI for comparing cookie origins
|
||||||
* @param int|null $time Reference time for expiration calculation
|
* @param int|null $time Reference time for expiration calculation
|
||||||
* @return array
|
* @return array
|
||||||
|
*
|
||||||
|
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $origin argument is not null or an instance of the Iri class.
|
||||||
*/
|
*/
|
||||||
public static function parse_from_headers(Headers $headers, Iri $origin = null, $time = null) {
|
public static function parse_from_headers(Headers $headers, $origin = null, $time = null) {
|
||||||
$cookie_headers = $headers->getValues('Set-Cookie');
|
$cookie_headers = $headers->getValues('Set-Cookie');
|
||||||
if (empty($cookie_headers)) {
|
if (empty($cookie_headers)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($origin !== null && !($origin instanceof Iri)) {
|
||||||
|
throw InvalidArgument::create(2, '$origin', Iri::class . ' or null', gettype($origin));
|
||||||
|
}
|
||||||
|
|
||||||
$cookies = [];
|
$cookies = [];
|
||||||
foreach ($cookie_headers as $header) {
|
foreach ($cookie_headers as $header) {
|
||||||
$parsed = self::parse($header, '', $time);
|
$parsed = self::parse($header, '', $time);
|
||||||
|
|
|
@ -148,7 +148,7 @@ class Requests {
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '2.0.9';
|
const VERSION = '2.0.11';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selected transport name
|
* Selected transport name
|
||||||
|
|
|
@ -144,7 +144,15 @@ final class Fsockopen implements Transport {
|
||||||
$verifyname = false;
|
$verifyname = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_context_set_option($context, ['ssl' => $context_options]);
|
// Handle the PHP 8.4 deprecation (PHP 9.0 removal) of the function signature we use for stream_context_set_option().
|
||||||
|
// Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#stream_context_set_option
|
||||||
|
if (function_exists('stream_context_set_options')) {
|
||||||
|
// PHP 8.3+.
|
||||||
|
stream_context_set_options($context, ['ssl' => $context_options]);
|
||||||
|
} else {
|
||||||
|
// PHP < 8.3.
|
||||||
|
stream_context_set_option($context, ['ssl' => $context_options]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$remote_socket = 'tcp://' . $host;
|
$remote_socket = 'tcp://' . $host;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-alpha-57874';
|
$wp_version = '6.6-alpha-57876';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue