Verified Commit 50943527 authored by dockx thibault's avatar dockx thibault
Browse files

:ambulance: (ldap) - fixes login issue

Fixes a wrong conditional statement.
No related merge requests found
Showing with 1 addition and 7 deletions
+1 -7
......@@ -607,13 +607,7 @@ class LDAP
function count ($srp)
{
if ($this->hascon) {
if ($this->hasres[$srp]) {
// Method ldap_read can return array of ldap\result (multiple ldap instances) or FALSE. We escape both.
// This is cleary a quick fix for php8.2 adaptation ...
if (is_bool($this->hasres[$srp]) || is_array($this->hasres[$srp])) {
logging::debug(DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $this->error, 'count()');
return FALSE;
}
if ($this->hasres[$srp] && !is_bool($this->start[$srp])) {
$rv = @ldap_count_entries($this->cid, $this->sr[$srp]);
$this->error = @ldap_error($this->cid);
logging::debug(DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $this->error, 'count()');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment