Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-11-05 14:48:26 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-11-05 14:48:26 +0300
commitcbee2ccef6e76681fd04c12493f2a7d60f8cbb71 (patch)
treeae2d217ca2f6c60e302a4fd348a5421870ce9ebf /lib/Attachment.php
parent81cc78d714efc89fa74ecb2acdfd4040c1b32e3e (diff)
Clean up array access in content dispositon code
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Attachment.php')
-rw-r--r--lib/Attachment.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Attachment.php b/lib/Attachment.php
index abec4a05f..7b5760c95 100644
--- a/lib/Attachment.php
+++ b/lib/Attachment.php
@@ -92,11 +92,8 @@ class Attachment {
$this->mimePart->setDispositionParameter('filename', $contentDisposition['filename']);
} else {
$contentDisposition = $mimeHeaders->getValue('content-type', \Horde_Mime_Headers::VALUE_PARAMS);
- $vars = ['name'];
- foreach ($contentDisposition as $key => $val) {
- if(in_array($key, $vars)) {
- $this->mimePart->setContentTypeParameter($key, $val);
- }
+ if (isset($contentDisposition['name'])) {
+ $this->mimePart->setContentTypeParameter('name', $contentDisposition['name']);
}
}