summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Bernigaud <mcmic@php.net>2015-11-12 07:04:09 +0100
committerCôme Bernigaud <mcmic@php.net>2015-11-12 07:06:05 +0100
commit391087ed280f86f144ffa5a2b72eeeda3c271743 (patch)
treea83a6d39c58258b152ecbc6326a0ddd56d594fbf
parentf72c7edfa4b7212a7b9583bf2f66f3b5e72b8602 (diff)
downloadphp-git-391087ed280f86f144ffa5a2b72eeeda3c271743.tar.gz
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.
-rw-r--r--ext/ldap/ldap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index ab663b156b..da8936cd76 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));