diff options
-rw-r--r-- | ext/ldap/ldap.c | 7 | ||||
-rw-r--r-- | ext/ldap/tests/ldap_connect_variation.phpt | 5 |
2 files changed, 1 insertions, 11 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 4ff6534227..e0faf24b16 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -365,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 diff --git a/ext/ldap/tests/ldap_connect_variation.phpt b/ext/ldap/tests/ldap_connect_variation.phpt index eaee261542..09b07e7786 100644 --- a/ext/ldap/tests/ldap_connect_variation.phpt +++ b/ext/ldap/tests/ldap_connect_variation.phpt @@ -28,10 +28,6 @@ var_dump($link); // bad hostname (connect should work, not bind) $link = ldap_connect("nonexistent" . $host); var_dump($link); - -// Legacy host:port syntax -$link = ldap_connect("$host:$port"); -var_dump($link); ?> ===DONE=== --EXPECTF-- @@ -40,5 +36,4 @@ resource(%d) of type (ldap link) resource(%d) of type (ldap link) resource(%d) of type (ldap link) resource(%d) of type (ldap link) -resource(%d) of type (ldap link) ===DONE=== |