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