summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-06-12 15:46:19 +0200
committerRobin Appelman <robin@icewind.nl>2017-06-12 15:46:19 +0200
commitf707a40f19b81876b455066106416c64366b1d19 (patch)
tree42c342bdeeae207ce787e59efbacf25bb4dedc7a /lib/private/Share20
parenta74901fce17da6d88dbb82373fff523b834d692d (diff)
downloadnextcloud-server-f707a40f19b81876b455066106416c64366b1d19.tar.gz
nextcloud-server-f707a40f19b81876b455066106416c64366b1d19.zip
filter missing groups in share provider
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 933a2a5a33e..459a409d3cc 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -743,6 +743,8 @@ class DefaultShareProvider implements IShareProvider {
$qb->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($node->getId())));
}
+
+ $groups = array_filter($groups, function($group) { return $group instanceof IGroup; });
$groups = array_map(function(IGroup $group) { return $group->getGID(); }, $groups);
$qb->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_GROUP)))