From 53014290cfe115b872d3fd9eaa1f3fd98d8b3ea4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Feb 2023 17:18:42 +0100 Subject: [PATCH] Fix unbind --- htdocs/core/class/ldap.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 3dc45c753bc..68464524621 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -401,7 +401,7 @@ class Ldap public function unbind() { $this->result = true; - if ($this->connection) { + if (is_resource($this->connection) || is_object($this->connection)) { $this->result = @ldap_unbind($this->connection); } if ($this->result) {