Mercurial > hg > rc2
diff program/lib/Roundcube/rcube_message.php @ 25:bea5a38be938
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Sat, 18 Oct 2025 12:24:31 -0400 |
| parents | e53add5ddac5 |
| children | c32b53434b47 |
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_message.php Fri Oct 17 17:31:22 2025 -0400 +++ b/program/lib/Roundcube/rcube_message.php Sat Oct 18 12:24:31 2025 -0400 @@ -46,9 +46,12 @@ * * @var rcube_mime */ - private $mime; - private $opt = array(); - private $parse_alternative = false; + protected $mime; + + protected $opt = []; + protected $parse_alternative = false; + protected $got_html_part = false; + protected $tnef_decode = false; public $uid; public $folder; @@ -308,7 +311,7 @@ } // detect charset... - if (!$part->charset || strtoupper($part->charset) == 'US-ASCII') { + if (empty($part->charset) || strtoupper($part->charset) == 'US-ASCII') { // try to extract charset information from HTML meta tag (#1488125) if ($part->ctype_secondary == 'html' && preg_match('/<meta[^>]+charset=([a-z0-9-_]+)/i', $body, $m)) { $part->charset = strtoupper($m[1]); @@ -347,7 +350,7 @@ continue; } - if (!$part->size) { + if (empty($part->size)) { continue; } @@ -659,13 +662,13 @@ // check if sub part is if ($is_multipart) $related_part = $p; - else if ($sub_mimetype == 'text/plain' && !$plain_part) + else if ($sub_mimetype == 'text/plain' && empty($plain_part)) $plain_part = $p; - else if ($sub_mimetype == 'text/html' && !$html_part) { + else if ($sub_mimetype == 'text/html' && empty($html_part)) { $html_part = $p; $this->got_html_part = true; } - else if ($sub_mimetype == 'text/enriched' && !$enriched_part) + else if ($sub_mimetype == 'text/enriched' && empty($enriched_part)) $enriched_part = $p; else { // add unsupported/unrecognized parts to attachments list @@ -845,7 +848,7 @@ ) { if ($mail_part->headers['content-id']) $mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']); - if (!isempty($mail_part->headers['content-location'])) + if (!empty($mail_part->headers['content-location'])) $mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location']; $this->add_part($mail_part, 'inline');
