Mercurial > hg > rc2
diff program/steps/mail/func.inc @ 22:303b85d5b561
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Wed, 15 Oct 2025 14:06:27 -0400 |
| parents | 73124dd49283 |
| children |
line wrap: on
line diff
--- a/program/steps/mail/func.inc Thu Oct 09 11:31:41 2025 -0400 +++ b/program/steps/mail/func.inc Wed Oct 15 14:06:27 2025 -0400 @@ -890,17 +890,17 @@ // initialize HTML washer $washer = new rcube_washtml($wash_opts); - if (!$p['skip_washer_form_callback']) { + if (empty($p['skip_washer_form_callback'])) { $washer->add_callback('form', 'rcmail_washtml_callback'); } // allow CSS styles, will be sanitized by rcmail_washtml_callback() - if (!$p['skip_washer_style_callback']) { + if (empty($p['skip_washer_style_callback'])) { $washer->add_callback('style', 'rcmail_washtml_callback'); } // modify HTML links to open a new window if clicked - if (!$p['skip_washer_link_callback']) { + if (empty($p['skip_washer_link_callback'])) { $washer->add_callback('a', 'rcmail_washtml_link_callback'); $washer->add_callback('area', 'rcmail_washtml_link_callback'); @@ -1536,7 +1536,7 @@ } // handle body styles related to background image - if ($style['background-image']) { + if (!empty($style['background-image'])) { // get body style if (preg_match('/#'.preg_quote($cont_id, '/').'\s+\{([^}]+)}/i', $body, $m)) { // get background related style @@ -1587,11 +1587,13 @@ $end = ' />'; } else if (preg_match('/^mailto:(.+)/i', $attrib['href'], $mailto)) { - list($mailto, $url) = explode('?', html_entity_decode($mailto[1], ENT_QUOTES, 'UTF-8'), 2); + $url_parts = explode('?', html_entity_decode($mailto[1], ENT_QUOTES, 'UTF-8'), 2); + $mailto = $url_parts[0]; + $url = $url_parts[1] ?? ''; // #6020: use raw encoding for correct "+" character handling as specified in RFC6068 - $url = rawurldecode($url); - $mailto = rawurldecode($mailto); + $url = rawurldecode($url??''); + $mailto = rawurldecode($mailto??''); $addresses = rcube_mime::decode_address_list($mailto, null, true); $mailto = array(); @@ -2050,7 +2052,7 @@ $name = strtolower($name); - if ($alias = $map[$name]) { + if ($alias = ($map[$name]??null)) { $name = $alias; } // Some versions of Outlook create garbage Content-Type:
