diff options
author | Pytal <24800714+Pytal@users.noreply.github.com> | 2021-12-09 15:59:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-09 15:59:51 -0800 |
commit | c019e33b9990cac4b81a71589bda9f8670c198e3 (patch) | |
tree | 2cefd73d3e4ff4ab918136e6746a7e9c692d8bed /lib/private/Files | |
parent | 92d3520106c34601b884d7c22835486ae2aeb203 (diff) | |
parent | 6f81e60bce600185f2bb37b36187b8751aa28344 (diff) | |
download | nextcloud-server-c019e33b9990cac4b81a71589bda9f8670c198e3.tar.gz nextcloud-server-c019e33b9990cac4b81a71589bda9f8670c198e3.zip |
Merge pull request #30160 from nextcloud/bugfix/noid/encryption-wrapper-fclose-check
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 308952c2a31..3ee715ae3d3 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -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) { |