1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-23 10:52:31 +01:00

Fix Header::decode() is not supported error in Webklex/php-imap - closes #3960

This commit is contained in:
FreeScout 2024-04-12 11:18:45 -07:00
parent ea068dc23e
commit a0ab8069d2

View File

@ -243,9 +243,9 @@ class Attachment {
$this->filename = $this->decodeName($filename);
}
if (($description = $this->part->description) !== null) {
$this->description = $this->part->getHeader()->decode($description);
}
// if (($description = $this->part->description) !== null) {
// $this->description = $this->part->getHeader()->decode($description);
// }
if (($name = $this->part->name) !== null) {
$this->name = $this->decodeName($name);
@ -270,10 +270,10 @@ class Attachment {
if (IMAP::ATTACHMENT_TYPE_MESSAGE == $this->part->type) {
if ($this->part->ifdescription) {
if (!$this->name) {
$this->name = $this->part->description;
$this->name = $this->decodeName($this->part->description);
}
} else if (!$this->name) {
$this->name = $this->part->subtype;
$this->name = $this->decodeName(($this->part->subtype);
}
}
$this->attributes = array_merge($this->part->getHeader()->getAttributes(), $this->attributes);