From 3f78a8190ff5403d03b5539f59d22f63674aaee6 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 26 Oct 2012 13:30:07 +0200 Subject: [PATCH] LDAP: check for resource before unbinding --- apps/user_ldap/lib/connection.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index bf65d9ad91c..cc24ea62434 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -64,7 +64,9 @@ class Connection { } public function __destruct() { - @ldap_unbind($this->ldapConnectionRes); + if(is_resource($this->ldapConnectionRes)) { + @ldap_unbind($this->ldapConnectionRes); + }; } public function __get($name) { -- 2.39.5