diff options
author | Robin Appelman <robin@icewind.nl> | 2017-07-17 14:19:44 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-07-17 14:21:22 +0200 |
commit | e49b8959c4e080272c68dcca8aff58f6c5b80d59 (patch) | |
tree | f65754305cc2f5a2fcf8095f8729a94429f086e1 | |
parent | 515d83236b3a77efcd9e41e8acf9cd7a6e5eec2e (diff) | |
download | nextcloud-server-e49b8959c4e080272c68dcca8aff58f6c5b80d59.tar.gz nextcloud-server-e49b8959c4e080272c68dcca8aff58f6c5b80d59.zip |
still remove the federated share even if we cant notify the remote
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/files_sharing/lib/External/Manager.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 54d0f9bd0c3..9473ce86658 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -366,8 +366,13 @@ class Manager { $result = $getShare->execute(array($hash, $this->uid)); if ($result) { - $share = $getShare->fetch(); - $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline'); + try { + $share = $getShare->fetch(); + $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline'); + } catch (\Exception $e) { + // if we fail to notify the remote (probably cause the remote is down) + // we still want the share to be gone to prevent undeletable remotes + } } $getShare->closeCursor(); |