]> granicus.if.org Git - php/commitdiff
Make URI parameter in ldap_connect default to NULL
authorCôme Chilliet <mcmic@php.net>
Thu, 17 Sep 2020 14:03:43 +0000 (16:03 +0200)
committerCôme Chilliet <mcmic@php.net>
Tue, 29 Sep 2020 14:31:07 +0000 (16:31 +0200)
ext/ldap/ldap.c
ext/ldap/ldap.stub.php
ext/ldap/ldap_arginfo.h

index a50882486ad0ba13d1eb68d495adfdc63f6c13bf..576d97c927ef37f2cb62c5580b26e5663a1918c0 100644 (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
index 372458fe78b9ebe0c8b805acba4fc7ffe608ca3e..2c48b812464ad63c386dfe185ba3579f67c68505 100644 (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 */
index d610408d974239f487995c312cc208fb79fb1ec9..4be65ae9b26c2c3449b805757ff9d419c05626f0 100644 (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