diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index 9405c2cf33492..f676ece2ddaad 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -105,11 +105,11 @@ public function getBucket() { * @return array with encryption parameters */ public function getSseKmsPutParameters(): array { - if (isset($this->sseKmsBucketKeyId)) { + if (empty($this->sseKmsBucketKeyId)) { return [ 'ServerSideEncryption' => 'aws:kms', ]; - } elseif (isset($this->sseKmsKeyId)) { + } elseif (empty($this->sseKmsKeyId)) { return [ 'ServerSideEncryption' => 'aws:kms', 'SSEKMSKeyId' => $this->sseKmsKeyId, @@ -127,12 +127,12 @@ public function getSseKmsPutParameters(): array { * @return array with encryption parameters */ public function getSseKmsGetParameters(): array { - if (isset($this->sseKmsBucketKeyId)) { + if (empty($this->sseKmsBucketKeyId)) { return [ 'ServerSideEncryption' => 'aws:kms', 'SSEKMSKeyId' => $this->sseKmsBucketKeyId, ]; - } elseif (isset($this->sseKmsKeyId)) { + } elseif (empty($this->sseKmsKeyId)) { return [ 'ServerSideEncryption' => 'aws:kms', 'SSEKMSKeyId' => $this->sseKmsKeyId,