com php-src: Using default port in ldap_connect when NULL is passed (this was the behavior prior to 5.6.11): ext/ldap/ldap.c
| From: | Côme Bernigaud | Date: | Thu, 12 Nov 2015 06:06:05 +0000 |
| Subject: | com php-src: Using default port in ldap_connect when NULL is passed (this was the behavior prior to 5.6.11): ext/ldap/ldap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89761@lists.php.net to get a copy of this message | ||
Commit: 391087ed280f86f144ffa5a2b72eeeda3c271743
Author: Côme Bernigaud <mcmic@php.net> Thu, 12 Nov 2015 07:04:09 +0100
Parents: f72c7edfa4b7212a7b9583bf2f66f3b5e72b8602
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=391087ed280f86f144ffa5a2b72eeeda3c271743
Log:
Using default port in ldap_connect when NULL is passed (this was the behavior prior to 5.6.11)
Note that passing 0 will also result in default port.
Changed paths:
M ext/ldap/ldap.c
Diff:
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index ab663b1..da8936c 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -349,6 +349,9 @@ PHP_FUNCTION(ldap_connect)
RETURN_FALSE;
}
#endif
+ if (!port) {
+ port = LDAP_PORT;
+ }
if (LDAPG(max_links) != -1 && LDAPG(num_links) >= LDAPG(max_links)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)",
LDAPG(num_links));