Skip to content

Commit

Permalink
Fix merging list with null
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
CarlSchwan committed Dec 12, 2021
1 parent 26b2f92 commit 2673c54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/user_ldap/lib/Group_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 2673c54

Please sign in to comment.