]> granicus.if.org Git - php/commitdiff
Revert "Added back support for undocummented host:port syntax"
authorCôme Bernigaud <mcmic@php.net>
Mon, 23 Nov 2015 02:08:25 +0000 (03:08 +0100)
committerCôme Bernigaud <mcmic@php.net>
Tue, 24 Nov 2015 02:45:21 +0000 (03:45 +0100)
This reverts commit 15876e85e59658bfbda3bf0b0c34d56ca503fd2f.

ext/ldap/ldap.c
ext/ldap/tests/ldap_connect_variation.phpt

index 4ff6534227828495f8fc3a74a58cf07fa67eb31a..e0faf24b160cab2d4c69c94ce23dd5e7b7e437ac 100644 (file)
@@ -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
index eaee261542514ef6102113d2d5003df5e92e7e61..09b07e778630f0fd5facffd9fb64fdf040f9324a 100644 (file)
@@ -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===