Skip to content

Commit f4862a8

Browse files
PVince81backportbot[bot]
authored andcommitted
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>
1 parent d870582 commit f4862a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/Files/Stream/Encryption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ protected static function wrapSource($source, $context, $protocol, $class, $mode
206206
} else {
207207
$wrapped = fopen($protocol . '://', $mode, false, $context);
208208
}
209-
} catch (\BadMethodCallException $e) {
209+
} catch (\Exception $e) {
210210
stream_wrapper_unregister($protocol);
211211
throw $e;
212212
}

0 commit comments

Comments
 (0)