Skip to content

Commit 1d41eb3

Browse files
committed
Deprecate calling ldap_connect() with more than 2 arguments
1 parent 811245d commit 1d41eb3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ PHP 8.4 UPGRADE NOTES
155155
deprecated. Use either IntlGregorianCalendar::createFromDate() or
156156
IntlGregorianCalendar::createFromDateTime() instead.
157157

158+
- LDAP:
159+
. Calling ldap_connect() with more than 2 arguments is deprecated. Use
160+
ldap_connect_wallet() instead.
161+
158162
========================================
159163
5. Changed Functions
160164
========================================

ext/ldap/ldap.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,11 @@ PHP_FUNCTION(ldap_connect)
926926
ldap_linkdata *ld;
927927
LDAP *ldap = NULL;
928928

929-
if (ZEND_NUM_ARGS() == 2) {
930-
zend_error(E_DEPRECATED, "Usage of ldap_connect with two arguments is deprecated");
929+
if (ZEND_NUM_ARGS() > 2) {
930+
zend_error(E_DEPRECATED, "Calling ldap_connect() with Oracle-specific arguments is deprecated, "
931+
"use ldap_connect_wallet() instead");
932+
} else if (ZEND_NUM_ARGS() == 2) {
933+
zend_error(E_DEPRECATED, "Usage of ldap_connect with two arguments is deprecated");
931934
}
932935

933936
#ifdef HAVE_ORALDAP

0 commit comments

Comments
 (0)