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:19:44 +0200 |
commit | 7fa02905aa5da32dbe5ad386de3cf3f9332940db (patch) | |
tree | 01e4687c944edf3ae985617cf6115f4445633070 | |
parent | 125767265dc2720d94571199720d19945a03974d (diff) | |
download | nextcloud-server-7fa02905aa5da32dbe5ad386de3cf3f9332940db.tar.gz nextcloud-server-7fa02905aa5da32dbe5ad386de3cf3f9332940db.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(); |