com php-src: Revert "Added back support for undocummented host:port syntax": ext/ldap/ldap.c ext/ldap/tests/ldap_connect_variat ion.phpt

From: Date: Mon, 23 Nov 2015 02:08:25 +0000
Subject: com php-src: Revert "Added back support for undocummented host:port syntax": ext/ldap/ldap.c ext/ldap/tests/ldap_connect_variat ion.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89961@lists.php.net to get a copy of this message
Commit: ab39f981f822d7f2f41612496c55b4e8b6213be9 Author: Côme Bernigaud <mcmic@php.net> Mon, 23 Nov 2015 03:08:25 +0100 Parents: a9bfdcb82ce6da10f9cf9592f9fd58990388335a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ab39f981f822d7f2f41612496c55b4e8b6213be9 Log: Revert "Added back support for undocummented host:port syntax" This reverts commit 15876e85e59658bfbda3bf0b0c34d56ca503fd2f. Changed paths: M ext/ldap/ldap.c M ext/ldap/tests/ldap_connect_variation.phpt Diff: diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 64885c7..ab663b1 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -369,12 +369,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 eaee261..09b07e7 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===

« previous php.cvs (#89961) next »