Skip to content

Commit

Permalink
Fix PHP8 fatal error when parsing a malformed BODYSTRUCTURE (#9171)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Oct 17, 2023
1 parent 41756cc commit 522562a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 522562a

Please sign in to comment.