Skip to content

Commit c5e9b1b

Browse files
committed
cherry pick of Ciki@b73f356
1 parent c241f8e commit c5e9b1b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

MailLibrary/Structures/ImapStructure.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,11 @@ protected function addStructurePart($structure, $partId)
189189
$this->id,
190190
$partId,
191191
self::$typeTable[$type]. '/' . $subtype,
192-
(empty($parameters['filename']) ? $parameters['filename'] : (
193-
empty($parameters['name']) ? $parameters['name'] : ''
194-
)),
192+
\imap_utf8(
193+
empty($parameters['filename']) ? $parameters['filename'] : (
194+
empty($parameters['name']) ? $parameters['name'] : ''
195+
)
196+
),
195197
$encoding
196198
);
197199

@@ -200,7 +202,9 @@ protected function addStructurePart($structure, $partId)
200202
$this->attachmentsIds[] = array(
201203
'id' => $partId,
202204
'encoding' => $encoding,
203-
'name' => isset($parameters['filename']) ? $parameters['filename'] : $parameters['name'],
205+
'name' => \imap_utf8(
206+
isset($parameters['filename']) ? $parameters['filename'] : $parameters['name']
207+
),
204208
'type' => self::$typeTable[$type]. '/' . $subtype,
205209
);
206210

0 commit comments

Comments
 (0)