mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
Merge pull request #30180 from nextcloud/backport/30160/stable23
[stable23] Check resource before closing in encryption wrapper
This commit is contained in:
commit
1fc27e771c
1 changed files with 6 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue