Fix warning scrutinizer
This commit is contained in:
parent
1934a37676
commit
66f85d674d
@ -181,6 +181,8 @@ class Ldap
|
||||
|
||||
$connected = 0;
|
||||
$this->bind = 0;
|
||||
$this->error = 0;
|
||||
$this->connectedServer = '';
|
||||
|
||||
// Check parameters
|
||||
if (count($this->server) == 0 || empty($this->server[0])) {
|
||||
@ -229,7 +231,7 @@ class Ldap
|
||||
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
|
||||
$this->error = 'ldap_start_tls Failed to start TLS '.ldap_errno($this->connection).' '.ldap_error($this->connection);
|
||||
$connected = 0;
|
||||
$this->close();
|
||||
$this->unbind();
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,7 +280,9 @@ class Ldap
|
||||
}
|
||||
|
||||
if (!$connected) {
|
||||
$this->close();
|
||||
$this->unbind();
|
||||
} else {
|
||||
$this->connectedServer = $host;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -291,7 +295,7 @@ class Ldap
|
||||
$return = -1;
|
||||
dol_syslog(get_class($this)."::connect_bind return=".$return.' - '.$this->error, LOG_WARNING);
|
||||
}
|
||||
$this->connectedServer = $host;
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user