summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <mcmic@php.net>2020-09-17 16:42:17 +0200
committerCôme Chilliet <mcmic@php.net>2020-09-29 16:31:07 +0200
commit74b634751b8957b30ce12601884ca4a8bc9067a8 (patch)
tree029c38e32c330721bfe93a74451c0dcb33e6b2b4
parent14385fb203e12bc4137cb7d4f1b5abe6cc5c37a0 (diff)
downloadphp-git-74b634751b8957b30ce12601884ca4a8bc9067a8.tar.gz
Default bind dn and password to NULL in ldap_bind_ext
-rw-r--r--ext/ldap/ldap.c2
-rw-r--r--ext/ldap/ldap.stub.php2
-rw-r--r--ext/ldap/ldap_arginfo.h6
3 files changed, 5 insertions, 5 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 652a641e4f..a43edd08a7 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -1175,7 +1175,7 @@ PHP_FUNCTION(ldap_bind_ext)
LDAPMessage *ldap_res;
int rc;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|ssa", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!a", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen, &serverctrls) != SUCCESS) {
RETURN_THROWS();
}
diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php
index 8187167bec..243e57b142 100644
--- a/ext/ldap/ldap.stub.php
+++ b/ext/ldap/ldap.stub.php
@@ -26,7 +26,7 @@ function ldap_bind($link_identifier, string $bind_rdn = NULL, string $bind_passw
* @param resource $link_identifier
* @return resource|false
*/
-function ldap_bind_ext($link_identifier, string $bind_rdn = UNKNOWN, string $bind_password = UNKNOWN, array $servercontrols = []) {}
+function ldap_bind_ext($link_identifier, string $bind_rdn = NULL, string $bind_password = NULL, array $servercontrols = []) {}
#ifdef HAVE_LDAP_SASL
/** @param resource $link */
diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h
index 9929281a7c..24cb31304b 100644
--- a/ext/ldap/ldap_arginfo.h
+++ b/ext/ldap/ldap_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 53a23f4146cec03d90833de5a80a550199460207 */
+ * Stub hash: 4414873610a8b2099ddad28cbadd6b8d75f66431 */
#if defined(HAVE_ORALDAP)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0)
@@ -32,8 +32,8 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1)
ZEND_ARG_INFO(0, link_identifier)
- ZEND_ARG_TYPE_INFO(0, bind_rdn, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, bind_password, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "NULL")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]")
ZEND_END_ARG_INFO()