Skip to content

Commit

Permalink
Unregister enc stream wrapper for any exception
Browse files Browse the repository at this point in the history
This prevents side effects in tests.
  • Loading branch information
PVince81 committed Aug 26, 2021
1 parent 60e4407 commit 28dc915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Stream/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected static function wrapSource($source, $context = [], $protocol = null, $
} else {
$wrapped = fopen($protocol . '://', $mode, false, $context);
}
} catch (\BadMethodCallException $e) {
} catch (\Exception $e) {
stream_wrapper_unregister($protocol);
throw $e;
}
Expand Down

0 comments on commit 28dc915

Please sign in to comment.