diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2015-04-02 13:35:56 (GMT) |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2015-04-02 13:35:56 (GMT) |
commit | 780283f2b726350d8f4e7f4725bf3c113c08413d (patch) | |
tree | 79769a037c049f9ba1e56cd292e9380ca38547ac | |
parent | 64b4f7f81ef7e9f6a21bb6c72327120c95d8e214 (diff) | |
download | Net_LDAP3-780283f2b726350d8f4e7f4725bf3c113c08413d.tar.gz |
-rw-r--r-- | lib/Net/LDAP3.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php index 4af66f3..2789bf6 100644 --- a/lib/Net/LDAP3.php +++ b/lib/Net/LDAP3.php @@ -3074,11 +3074,17 @@ class Net_LDAP3 if ($result = $this->search($domain_base_dn, $domain_filter, 'sub', $attributes)) { $result = $result->entries(true); $domain_dn = key($result); - $result = $result[$domain_dn]; - $result['dn'] = $domain_dn; - // cache domain DN - $this->set_cache_data($ckey, $domain_dn); + if (empty($domain_dn)) { + $result = false; + } + else { + $result = $result[$domain_dn]; + $result['dn'] = $domain_dn; + + // cache domain DN + $this->set_cache_data($ckey, $domain_dn); + } } } |