1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 04:02:19 +02:00

Make URI parameter in ldap_connect default to NULL

This commit is contained in:
Côme Chilliet
2020-09-17 16:03:43 +02:00
parent e39ce172f8
commit 6b77252f18
3 changed files with 7 additions and 7 deletions

View File

@@ -1001,7 +1001,7 @@ PHP_FUNCTION(ldap_connect)
WRONG_PARAM_COUNT;
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|slssl", &host, &hostlen, &port, &wallet, &walletlen, &walletpasswd, &walletpasswdlen, &authmode) != SUCCESS) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!lssl", &host, &hostlen, &port, &wallet, &walletlen, &walletpasswd, &walletpasswdlen, &authmode) != SUCCESS) {
RETURN_THROWS();
}
@@ -1009,7 +1009,7 @@ PHP_FUNCTION(ldap_connect)
ssl = 1;
}
#else
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sl", &host, &hostlen, &port) != SUCCESS) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!l", &host, &hostlen, &port) != SUCCESS) {
RETURN_THROWS();
}
#endif

View File

@@ -4,10 +4,10 @@
#ifdef HAVE_ORALDAP
/** @return resource|false */
function ldap_connect(string $hostname = UNKNOWN, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {}
function ldap_connect(string $uri = NULL, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {}
#else
/** @return resource|false */
function ldap_connect(string $hostname = UNKNOWN, int $port = 389) {}
function ldap_connect(string $uri = NULL, int $port = 389) {}
#endif
/** @param resource $link_identifier */

View File

@@ -1,9 +1,9 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: f07138972651411473c34c5ee2d0c2de94e01ada */
* Stub hash: 7db7fd320ca8ac2501d22f6cb473a08f47b82ad3 */
#if defined(HAVE_ORALDAP)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0)
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389")
ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, wallet_passwd, IS_STRING, 0)
@@ -13,7 +13,7 @@ ZEND_END_ARG_INFO()
#if !(defined(HAVE_ORALDAP))
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0)
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389")
ZEND_END_ARG_INFO()
#endif