Fix unbind

This commit is contained in:
Laurent Destailleur 2023-02-22 17:18:42 +01:00
parent 57ba45d625
commit 53014290cf

View File

@ -401,7 +401,7 @@ class Ldap
public function unbind() public function unbind()
{ {
$this->result = true; $this->result = true;
if ($this->connection) { if (is_resource($this->connection) || is_object($this->connection)) {
$this->result = @ldap_unbind($this->connection); $this->result = @ldap_unbind($this->connection);
} }
if ($this->result) { if ($this->result) {