]> source.dussan.org Git - nextcloud-server.git/commitdiff
still remove the federated share even if we cant notify the remote 5754/head
authorRobin Appelman <robin@icewind.nl>
Mon, 17 Jul 2017 12:19:44 +0000 (14:19 +0200)
committerRobin Appelman <robin@icewind.nl>
Mon, 17 Jul 2017 12:21:22 +0000 (14:21 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_sharing/lib/External/Manager.php

index 54d0f9bd0c30a0a1496ba374033baf5917888754..9473ce8665896393a36d834f3fb2cb83b246936d 100644 (file)
@@ -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();