From 317118ef79cb2d907acc93b30a294a467f60080e Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Thu, 7 Jan 2021 14:32:26 +0100
Subject: [PATCH] Catch throwable instead of exception

The error that gets thrown can also be a type error etc. So we should
properly catch the Throwable.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
---
 lib/private/Encryption/Keys/Storage.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/Encryption/Keys/Storage.php b/lib/private/Encryption/Keys/Storage.php
index a2b27de6b51..c70ebc15ec2 100644
--- a/lib/private/Encryption/Keys/Storage.php
+++ b/lib/private/Encryption/Keys/Storage.php
@@ -301,7 +301,7 @@ class Storage implements IStorage {
 						$fallback = false;
 						try {
 							$clearData = $this->crypto->decrypt($data);
-						} catch (\Exception $e) {
+						} catch (\Throwable $e) {
 							$fallback = true;
 						}
 
-- 
GitLab