diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-08-26 11:23:03 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-08-26 15:20:04 +0300 |
commit | 2032ca7457c8bce02148240c5086e6bb2c622aea (patch) | |
tree | 425c787538c0c0aa1bb8b2e9bde2812eb3ae5f45 /lib | |
parent | fd6c5a134ffe63c1f880723a6b85ab1c124e2eec (diff) |
Unregister enc stream wrapper for any exception
This prevents side effects in tests by properly cleaning up
even with expected exceptions.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Stream/Encryption.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php index 16d2ca3ce97..fc75ead1e45 100644 --- a/lib/private/Files/Stream/Encryption.php +++ b/lib/private/Files/Stream/Encryption.php @@ -213,7 +213,7 @@ class Encryption extends Wrapper { } else { $wrapped = fopen($protocol . '://', $mode, false, $context); } - } catch (\BadMethodCallException $e) { + } catch (\Exception $e) { stream_wrapper_unregister($protocol); throw $e; } |