]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: check for resource before unbinding
authorArthur Schiwon <blizzz@owncloud.com>
Fri, 26 Oct 2012 11:30:07 +0000 (13:30 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Fri, 26 Oct 2012 19:54:34 +0000 (21:54 +0200)
apps/user_ldap/lib/connection.php

index bf65d9ad91c8870bc41cf7d0eafe24ce11de1e7d..cc24ea62434753a9836fb67b70947e1e96b81309 100644 (file)
@@ -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) {