From 2673c5472bf73bc778903bc3e5422957a0b86d6f Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 10 Dec 2021 16:39:50 +0100 Subject: [PATCH] Fix merging list with null This fixes some cases observed with the debugger where we end up merging a non empty list with null. The result is then null and the looping over the items would then end. Signed-off-by: Carl Schwan --- apps/user_ldap/lib/Group_LDAP.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index f4ccfe3430455..c11f5c7a82fb5 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -24,6 +24,7 @@ * @author Victor Dubiniuk * @author Vinicius Cubas Brand * @author Xuanwo + * @author Carl Schwan * * @license AGPL-3.0 * @@ -376,7 +377,7 @@ private function processListFromWalkingNestedGroups(array &$list, array &$seen, $fetched = $this->access->connection->getFromCache($cacheKey); if ($fetched === null) { $fetched = $fetcher($recordDN); - $fetched = $this->access->connection->writeToCache($cacheKey, $fetched); + $this->access->connection->writeToCache($cacheKey, $fetched); } $list = array_merge($list, $fetched); if (!isset($seen[$recordDN]) || is_bool($seen[$recordDN]) && is_array($record)) {