summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-07-21 12:45:01 +0200
committerGitHub <noreply@github.com>2017-07-21 12:45:01 +0200
commit86d2fe516e5a6e5cc61c55c63d54d40177b75518 (patch)
tree32f573ef0ac6c533b4303489d2ccc3edeb585510 /apps/files_sharing/lib
parent37bff5ceda2edd78c13e803216de1fc178685ab3 (diff)
parent7fa02905aa5da32dbe5ad386de3cf3f9332940db (diff)
downloadnextcloud-server-86d2fe516e5a6e5cc61c55c63d54d40177b75518.tar.gz
nextcloud-server-86d2fe516e5a6e5cc61c55c63d54d40177b75518.zip
Merge pull request #5753 from nextcloud/fed-unshare-fail-remote
still remove the federated share even if we cant notify the remote
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/External/Manager.php9
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();