Skip to content

Commit b8ac207

Browse files
committed
Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
There is no `ldap_create()`, but rather `ldap_connect()`. Closes GH-10115.
1 parent 7a983e2 commit b8ac207

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ PHP NEWS
55
- Apache:
66
. Fixed bug GH-9949 (Partial content on incomplete POST request). (cmb)
77

8+
- LDAP:
9+
. Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()).
10+
(cmb)
11+
812
- TSRM:
913
. Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre)
1014

ext/ldap/ldap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static zend_object *ldap_link_create_object(zend_class_entry *class_type) {
119119
}
120120

121121
static zend_function *ldap_link_get_constructor(zend_object *object) {
122-
zend_throw_error(NULL, "Cannot directly construct LDAP\\Connection, use ldap_create() instead");
122+
zend_throw_error(NULL, "Cannot directly construct LDAP\\Connection, use ldap_connect() instead");
123123
return NULL;
124124
}
125125

ext/ldap/tests/ldap_constructor.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ try {
1111
echo "Exception: ", $ex->getMessage(), "\n";
1212
}
1313
--EXPECT--
14-
Exception: Cannot directly construct LDAP\Connection, use ldap_create() instead
14+
Exception: Cannot directly construct LDAP\Connection, use ldap_connect() instead

0 commit comments

Comments
 (0)