From 391087ed280f86f144ffa5a2b72eeeda3c271743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Bernigaud?= Date: Thu, 12 Nov 2015 07:04:09 +0100 Subject: 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. --- ext/ldap/ldap.c | 3 +++ 1 file changed, 3 insertions(+) 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)); -- cgit v1.2.1