Skip to content

Directly creating LDAP\Connection object refers to nonexistent ldap_create function #10112

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
zerocrates opened this issue Dec 15, 2022 · 1 comment

Comments

@zerocrates
Copy link

Description

The following code:

<?php
new LDAP\Connection;

Resulted in this output:

Error: Cannot directly construct LDAP\Connection, use ldap_create() instead

But I expected this output instead:

Error: Cannot directly construct LDAP\Connection, use ldap_connect() instead

PHP Version

PHP 8.2.0

Operating System

No response

@damianwadley
Copy link
Member

Looks like a simple mistake introduced with 8.1.0 when the extension was converted to use objects.
cd40fc3

cmb69 added a commit to cmb69/php-src that referenced this issue Dec 16, 2022
There is no `ldap_create()`, but rather `ldap_connect()`.
@cmb69 cmb69 closed this as completed in b8ac207 Dec 16, 2022
cmb69 added a commit that referenced this issue Dec 16, 2022
* PHP-8.1:
  Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
cmb69 added a commit that referenced this issue Dec 16, 2022
* PHP-8.2:
  Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@zerocrates @damianwadley and others