diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:22 +0000 |
commit | fc0a79914946dac00ccd51b1aacffe267de7210e (patch) | |
tree | 1403384efbfe8f8776ff60aaa40f7d535c02c822 /wp-includes/Requests/src/Transport/Fsockopen.php | |
parent | Releasing progress-linux version 6.5.5+dfsg1-1~progress7.99u1. (diff) | |
download | wordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.tar.xz wordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.zip |
Merging upstream version 6.6.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/Requests/src/Transport/Fsockopen.php')
-rw-r--r-- | wp-includes/Requests/src/Transport/Fsockopen.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/wp-includes/Requests/src/Transport/Fsockopen.php b/wp-includes/Requests/src/Transport/Fsockopen.php index 2b53d0c..6bd82a3 100644 --- a/wp-includes/Requests/src/Transport/Fsockopen.php +++ b/wp-includes/Requests/src/Transport/Fsockopen.php @@ -144,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; } |