LDAP: check for resource before unbinding

This commit is contained in:
Arthur Schiwon 2012-10-26 13:30:07 +02:00
parent 46871e9b2e
commit 3f78a8190f
1 changed files with 3 additions and 1 deletions

View 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) {