diff --git a/NEWS b/NEWS index 61185a9a36b..0e1c6bfa3d6 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.2.2 +- LDAP: + . Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()). + (cmb) 05 Jan 2023, PHP 8.2.1 diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index b8fb4274215..51eca3d7cc4 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -121,7 +121,7 @@ static zend_object *ldap_link_create_object(zend_class_entry *class_type) { } static zend_function *ldap_link_get_constructor(zend_object *object) { - zend_throw_error(NULL, "Cannot directly construct LDAP\\Connection, use ldap_create() instead"); + zend_throw_error(NULL, "Cannot directly construct LDAP\\Connection, use ldap_connect() instead"); return NULL; } diff --git a/ext/ldap/tests/ldap_constructor.phpt b/ext/ldap/tests/ldap_constructor.phpt index 37db6112dce..6c79dee8b39 100644 --- a/ext/ldap/tests/ldap_constructor.phpt +++ b/ext/ldap/tests/ldap_constructor.phpt @@ -11,4 +11,4 @@ try { echo "Exception: ", $ex->getMessage(), "\n"; } --EXPECT-- -Exception: Cannot directly construct LDAP\Connection, use ldap_create() instead +Exception: Cannot directly construct LDAP\Connection, use ldap_connect() instead