Browse Source

Fix a couple of PHP8 warnings (#8175)

pull/8503/head
Aleksander Machniak 4 years ago
parent
commit
4714f3192a
  1. 1
      CHANGELOG.md
  2. 4
      program/lib/Roundcube/rcube_imap.php
  3. 2
      program/lib/Roundcube/rcube_imap_cache.php

1
CHANGELOG.md

@ -16,6 +16,7 @@
- Fix displaying inline images with incorrectly declared content-type (#8158)
- Fix so addr-spec with missing closing angle bracket can be parsed (#8164)
- Fix handling of spellcheck connection errors (#8172)
- Fix a couple of PHP8 warnings (#8175, #8176)
## Release 1.5-rc

4
program/lib/Roundcube/rcube_imap.php

@ -2185,7 +2185,7 @@ class rcube_imap extends rcube_storage
$di += 3;
}
if (is_array($part[$di]) && count($part[$di]) == 2) {
if (isset($part[$di]) && is_array($part[$di]) && count($part[$di]) == 2) {
$struct->disposition = strtolower($part[$di][0]);
if ($struct->disposition && $struct->disposition !== 'inline' && $struct->disposition !== 'attachment') {
// RFC2183, Section 2.8 - unrecognized type should be treated as "attachment"
@ -2199,7 +2199,7 @@ class rcube_imap extends rcube_storage
}
// get message/rfc822's child-parts
if (is_array($part[8]) && $di != 8) {
if (isset($part[8]) && is_array($part[8]) && $di != 8) {
$struct->parts = [];
for ($i=0, $count=0; $i<count($part[8]); $i++) {
if (!is_array($part[8][$i])) {

2
program/lib/Roundcube/rcube_imap_cache.php

@ -789,7 +789,7 @@ class rcube_imap_cache
(int) $this->skip_deleted,
(int) $mbox_data['UIDVALIDITY'],
(int) $mbox_data['UIDNEXT'],
$modseq ? $modseq : $mbox_data['HIGHESTMODSEQ'],
$modseq ?: (isset($mbox_data['HIGHESTMODSEQ']) ? $mbox_data['HIGHESTMODSEQ'] : ''),
];
$data = implode('@', $data);

Loading…
Cancel
Save