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 54fa822 commit 6880e08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- Password: Add ldap_samba_ad driver (#8525)
- Password: Allow LDAP access using LDAP URI and SASL binding (#8402)
- Fix potential HTTP protocol version mismatch (#8982)
- Fix PHP8 fatal error when parsing a malformed BODYSTRUCTURE (#9171)

## Release 1.6.4

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 @@ -2166,7 +2166,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 6880e08

Please sign in to comment.