From ae3ded0662fb4dc198e291237d44b0fa65298dd3 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 11 Feb 2025 12:03:56 +0100 Subject: [PATCH] fix(occ): handle share wrappers that do not have a circle Signed-off-by: Max --- lib/Command/SharesFiles.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/Command/SharesFiles.php b/lib/Command/SharesFiles.php index 8930ff47c..822096338 100644 --- a/lib/Command/SharesFiles.php +++ b/lib/Command/SharesFiles.php @@ -223,15 +223,20 @@ private function displayShares( $sharedTo .= '@' . $recipient->getInstance(); } } - $circle = $share->getCircle(); + $circleField = ''; + if ($share->hasCircle()) { + $circle = $share->getCircle(); + $circleField = $circle->getDisplayName() + . ' (' . $share->getSharedWith() + . ', ' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; + } $row = [ $share->getId(), $share->getFileSource(), $share->getShareOwner(), $share->getFileTarget(), $share->getSharedBy(), - $circle->getDisplayName() . ' (' . $share->getSharedWith() - . ', ' . Circle::$DEF_SOURCE[$circle->getSource()] . ')' + $circleField, ]; if (!$filterRecipient) {