Merge pull request #30160 from nextcloud/bugfix/noid/encryption-wrapper-fclose-check

This commit is contained in:
Pytal 2021-12-09 15:59:51 -08:00 committed by GitHub
commit c019e33b99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -784,8 +784,12 @@ class Encryption extends Wrapper {
fclose($source);
fclose($target);
} catch (\Exception $e) {
fclose($source);
fclose($target);
if (is_resource($source)) {
fclose($source);
}
if (is_resource($target)) {
fclose($target);
}
throw $e;
}
if ($result) {