}
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
// 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--
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===