diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bb5ae3fd7e..bd03ea0e102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +- Fix PHP8 fatal error when parsing a malformed BODYSTRUCTURE (#9171) + +## Release 1.6.4 + - Fix PHP8 warnings (#9142, #9160) - Fix default 'mime.types' path on Windows (#9113) - Managesieve: Fix javascript error when relational or spamtest extension is not enabled (#9139) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index d5ec7d73546..6689bbf8348 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -2164,7 +2164,7 @@ protected function structure_part($part, $count = 0, $parent = '', $mime_headers } // read content encoding - if (!empty($part[5])) { + if (!empty($part[5]) && !is_array($part[5])) { $struct->encoding = strtolower($part[5]); $struct->headers['content-transfer-encoding'] = $struct->encoding; }