From: Máté Kocsis Date: Fri, 10 Apr 2020 15:17:12 +0000 (+0200) Subject: Fix the default parameter values of stream_socket_client() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=beff93f60ddb330cc5b04d716af3ba9cba108c8e;p=php Fix the default parameter values of stream_socket_client() $timeout and $flags were mixed up --- diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index f63a5dbae6..1700f3ad10 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1263,7 +1263,7 @@ function stream_filter_remove($stream_filter): bool {} * @param resource|null $context * @return resource|false */ -function stream_socket_client(string $remote_socket, &$errno = null, &$errstr = null, float $timeout = STREAM_CLIENT_CONNECT, int $flags = UNKNOWN, $context = null) {} +function stream_socket_client(string $remote_socket, &$errno = null, &$errstr = null, float $timeout = UNKNOWN, int $flags = STREAM_CLIENT_CONNECT, $context = null) {} /** * @param resource|null $context diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index f5ff383d24..7208e2d046 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1908,8 +1908,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, remote_socket, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errno, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errstr, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_DOUBLE, 0, "STREAM_CLIENT_CONNECT") - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "STREAM_CLIENT_CONNECT") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO()