Skip to content

Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create() #10115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/ldap/ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,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;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/ldap/tests/ldap_constructor.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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