diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-11-05 14:48:26 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-11-05 14:48:26 +0300 |
commit | cbee2ccef6e76681fd04c12493f2a7d60f8cbb71 (patch) | |
tree | ae2d217ca2f6c60e302a4fd348a5421870ce9ebf /lib/Attachment.php | |
parent | 81cc78d714efc89fa74ecb2acdfd4040c1b32e3e (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.php | 7 |
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']); } } |