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 <carl@carlschwan.eu>
This commit is contained in:
Carl Schwan 2021-12-10 16:39:50 +01:00
parent 49aa352069
commit 6522f8a6d9

View file

@ -24,6 +24,7 @@
* @author Victor Dubiniuk <dubiniuk@owncloud.com>
* @author Vinicius Cubas Brand <vinicius@eita.org.br>
* @author Xuanwo <xuanwo@yunify.com>
* @author Carl Schwan <carl@carlschwan.eu>
*
* @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)) {