Do not only catch Exceptions but any Throwable during rmt share delete

When a remote share is deleted, we notify the remove instance. This may
trigger various error conditions, which we want to catch in order to
avoid undeletable shares. The try-catch, however, did only capture
exceptions, so things like TypeErrors were not caught and caused the
process to fail hard.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2020-06-02 09:21:09 +02:00
parent 796b454021
commit 09a632242d
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
1 changed files with 2 additions and 2 deletions

View File

@ -520,7 +520,7 @@ class Manager {
if ($result && $share !== false && (int)$share['share_type'] === Share::SHARE_TYPE_USER) {
try {
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline');
} catch (\Exception $e) {
} catch (\Throwable $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
}