Skip to content

Commit 391087e

Browse files
author
Côme Bernigaud
committed
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.
1 parent f72c7ed commit 391087e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/ldap/ldap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ PHP_FUNCTION(ldap_connect)
349349
RETURN_FALSE;
350350
}
351351
#endif
352+
if (!port) {
353+
port = LDAP_PORT;
354+
}
352355

353356
if (LDAPG(max_links) != -1 && LDAPG(num_links) >= LDAPG(max_links)) {
354357
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", LDAPG(num_links));

0 commit comments

Comments
 (0)