From 95ceaf2b7cb7c47724b24bf1c42d29b9e0744de2 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 53d209b5e..972d82175 100644 --- a/lib/Command/SharesFiles.php +++ b/lib/Command/SharesFiles.php @@ -203,15 +203,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) {