diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 1dc685190b6dd..d5ce1e92e5013 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -1042,7 +1042,7 @@ public static function unshareFromSelf($itemType, $itemOrigin, $originIsSource = if (isset($groupShare['file_target'])) { $shareTmp['fileTarget'] = $groupShare['file_target']; } - $listOfUnsharedItems = array_merge($listOfUnsharedItems, array($groupShare)); + $listOfUnsharedItems = array_merge($listOfUnsharedItems, array($shareTmp)); $itemUnshared = true; } elseif (!$itemUnshared && isset($uniqueGroupShare)) { $query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `permissions` = ? WHERE `id` = ?'); @@ -1057,7 +1057,7 @@ public static function unshareFromSelf($itemType, $itemOrigin, $originIsSource = if (isset($uniqueGroupShare['file_target'])) { $shareTmp['fileTarget'] = $uniqueGroupShare['file_target']; } - $listOfUnsharedItems = array_merge($listOfUnsharedItems, array($uniqueGroupShare)); + $listOfUnsharedItems = array_merge($listOfUnsharedItems, array($shareTmp)); $itemUnshared = true; }