diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index bf65d9ad91..cc24ea6243 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) {