From: Nikita Popov Date: Thu, 9 Apr 2020 13:46:33 +0000 (+0200) Subject: Make stream_socket_enable_crypto() session stream nullable X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3f3a80f9c95ff69d9078f9f156417bdf9e91a14;p=php Make stream_socket_enable_crypto() session stream nullable --- diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 557151a31d..d0a3109a7f 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1289,7 +1289,7 @@ function stream_socket_sendto($socket, string $data, int $flags = 0, string $add /** * @param resource $stream - * @param resource $session_stream + * @param resource|null $session_stream */ function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_type = null, $session_stream = null): int|bool {} diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 4922fdf4cc..e8fd16d3df 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -1495,7 +1495,7 @@ PHP_FUNCTION(stream_socket_enable_crypto) Z_PARAM_BOOL(enable) Z_PARAM_OPTIONAL Z_PARAM_LONG_OR_NULL(cryptokind, cryptokindnull) - Z_PARAM_RESOURCE(zsessstream) + Z_PARAM_RESOURCE_OR_NULL(zsessstream) ZEND_PARSE_PARAMETERS_END(); php_stream_from_zval(stream, zstream);