diff options
Diffstat (limited to 'ext/ldap/ldap.c')
-rw-r--r-- | ext/ldap/ldap.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 9eaad2d878..e0faf24b16 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -345,9 +345,6 @@ 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, E_WARNING, "Too many open links (%pd)", LDAPG(num_links)); @@ -368,12 +365,7 @@ PHP_FUNCTION(ldap_connect) } url = emalloc(urllen); - if (host && (strchr(host, ':') != NULL)) { - /* Legacy support for host:port */ - snprintf( url, urllen, "ldap://%s", host ); - } else { - snprintf( url, urllen, "ldap://%s:%ld", host ? host : "", port ); - } + snprintf( url, urllen, "ldap://%s:%ld", host ? host : "", port ); } #ifdef LDAP_API_FEATURE_X_OPENLDAP |