summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Regad <dregad@mantisbt.org>2023-11-16 16:52:51 +0100
committerDamien Regad <dregad@mantisbt.org>2024-03-22 22:42:08 +0100
commit453b4f3b84f1965905c11ff3efa29f8312638483 (patch)
tree4ee3dca683e94c18a6522d73d5227f40170592b3
parent6c7b6fee98a19a2cb64d2b05cfd02f9e2c8ebe98 (diff)
downloadadodb-453b4f3b84f1965905c11ff3efa29f8312638483.tar.gz
adodb-453b4f3b84f1965905c11ff3efa29f8312638483.tar.bz2
adodb-453b4f3b84f1965905c11ff3efa29f8312638483.zip
ldap: PHP 8.2 error when $LDAP_CONNECT_OPTIONS not set
Calling connect() method When the $LDAP_CONNECT_OPTIONS global variable is not set results in PHP Fatal error: Uncaught TypeError: count(): Argument 1 ($value) must be of type Countable|array, null given. Replacing count()>0 by !empty() to avoid the problem. Fixes #1009
-rw-r--r--drivers/adodb-ldap.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/adodb-ldap.inc.php b/drivers/adodb-ldap.inc.php
index 305f6a7f..e1cba330 100644
--- a/drivers/adodb-ldap.inc.php
+++ b/drivers/adodb-ldap.inc.php
@@ -76,7 +76,7 @@ class ADODB_ldap extends ADOConnection {
if ($this->debug) ADOConnection::outp($e);
return false;
}
- if( count( $LDAP_CONNECT_OPTIONS ) > 0 ) {
+ if(!empty($LDAP_CONNECT_OPTIONS)) {
$this->_inject_bind_options( $LDAP_CONNECT_OPTIONS );
}