summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <mcmic@php.net>2020-09-17 16:03:43 +0200
committerCôme Chilliet <mcmic@php.net>2020-09-29 16:31:07 +0200
commit6b77252f188eaf5443d08c58df4e502c1ecb2e10 (patch)
treef3238908cdfe2f50e682bb9e4caaa4645e8b2191
parente39ce172f80e89e793a1b73ebe59a1e462b9ec31 (diff)
downloadphp-git-6b77252f188eaf5443d08c58df4e502c1ecb2e10.tar.gz
Make URI parameter in ldap_connect default to NULL
-rw-r--r--ext/ldap/ldap.c4
-rw-r--r--ext/ldap/ldap.stub.php4
-rw-r--r--ext/ldap/ldap_arginfo.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index a50882486a..576d97c927 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -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
diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php
index 372458fe78..2c48b81246 100644
--- a/ext/ldap/ldap.stub.php
+++ b/ext/ldap/ldap.stub.php
@@ -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 */
diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h
index d610408d97..4be65ae9b2 100644
--- a/ext/ldap/ldap_arginfo.h
+++ b/ext/ldap/ldap_arginfo.h
@@ -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