diff options
author | Jasper Knockaert <jasper@knockaert.nl> | 2021-01-16 14:33:44 +0100 |
---|---|---|
committer | MichaIng (Rebase PR Action) <micha@dietpi.com> | 2021-09-03 13:40:41 +0000 |
commit | 5f9663d2c85f09c2b75b16d08c8305fbc419d98f (patch) | |
tree | b5d61625f1d4339d03524a008ffba6be22941dcf /lib/private | |
parent | 5341807b14d1242d6852377f70ef80b1f9325ff4 (diff) | |
download | nextcloud-server-5f9663d2c85f09c2b75b16d08c8305fbc419d98f.tar.gz nextcloud-server-5f9663d2c85f09c2b75b16d08c8305fbc419d98f.zip |
consolidation of boolean expression
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 7482212157e..96927485c29 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -937,11 +937,8 @@ class Encryption extends Wrapper { // if the header doesn't contain a encryption module we check if it is a // legacy file. If true, we add the default encryption module - if (!isset($result[Util::HEADER_ENCRYPTION_MODULE_KEY])) { - if (!empty($result)) { - $result[Util::HEADER_ENCRYPTION_MODULE_KEY] = 'OC_DEFAULT_MODULE'; - } elseif ($exists) { - $result[Util::HEADER_ENCRYPTION_MODULE_KEY] = 'OC_DEFAULT_MODULE'; + if (!isset($result[Util::HEADER_ENCRYPTION_MODULE_KEY] && (!empty($result) || $exists)) { + $result[Util::HEADER_ENCRYPTION_MODULE_KEY] = 'OC_DEFAULT_MODULE'; } } } |