提交的内容
This commit is contained in:
17
vendor/rmccue/requests/src/Transport/Fsockopen.php
vendored
Executable file → Normal file
17
vendor/rmccue/requests/src/Transport/Fsockopen.php
vendored
Executable file → Normal file
@ -51,6 +51,11 @@ final class Fsockopen implements Transport {
|
||||
*/
|
||||
private $max_bytes = false;
|
||||
|
||||
/**
|
||||
* Cache for received connection errors.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $connect_error = '';
|
||||
|
||||
/**
|
||||
@ -139,7 +144,15 @@ final class Fsockopen implements Transport {
|
||||
$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 {
|
||||
$remote_socket = 'tcp://' . $host;
|
||||
}
|
||||
@ -405,7 +418,7 @@ final class Fsockopen implements Transport {
|
||||
/**
|
||||
* Format a URL given GET data
|
||||
*
|
||||
* @param array $url_parts
|
||||
* @param array $url_parts Array of URL parts as received from {@link https://www.php.net/parse_url}
|
||||
* @param array|object $data Data to build query using, see {@link https://www.php.net/http_build_query}
|
||||
* @return string URL with data
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user