From 6522f8a6d98f81a10f68cd01294201997d51c3a0 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 6b50c30ff0a..c2259c42aba 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 * @@ -375,7 +376,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I $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)) {