summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJasper Knockaert <jasper@knockaert.nl>2021-01-16 14:33:44 +0100
committerGitHub <noreply@github.com>2021-01-16 14:33:44 +0100
commitf9a0380eb1da63a9d70c039d458897aa2366b2ca (patch)
treed936054a8d4558408211c6fda7457933900a2974 /lib/private
parent261966ace5f539f0ab676a063506f6e63469dce5 (diff)
downloadnextcloud-server-f9a0380eb1da63a9d70c039d458897aa2366b2ca.tar.gz
nextcloud-server-f9a0380eb1da63a9d70c039d458897aa2366b2ca.zip
consolidation of boolean expression
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php7
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 b37fcdb2bd0..c4953eddf23 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -941,11 +941,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';
}
}
}