From 5201bb61595c3ade331d912fe8cfbfaa03093b29 Mon Sep 17 00:00:00 2001
From: Jeroen van Meeuwen <kanarip@kanarip.ch>
Date: Mon, 23 Sep 2019 14:49:04 +0200
Subject: [PATCH] Avoid errors in missing caches

---
 lib/Net/LDAP3.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index 89851c2..36ec6c4 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -3066,8 +3066,8 @@ class Net_LDAP3
         }
 
         $ckey = 'domain.root::' . $domain;
-        if ($result = $this->icache[$ckey]) {
-            return $result;
+        if (array_key_exists($ckey, $this->icache)) {
+            return $this->icache[$ckey];
         }
 
         $this->_debug("Net_LDAP3::domain_root_dn($domain)");
@@ -3120,7 +3120,7 @@ class Net_LDAP3
         $ckey  = 'domain::' . $domain;
         $ickey = $ckey . '::' . md5(implode(',', $attributes));
 
-        if (isset($this->icache[$ickey])) {
+        if (array_key_exists($ckey, $this->icache)) {
             return $this->icache[$ickey];
         }
 
-- 
GitLab