From 602a989697c129302c9e33a17965f9e1f3ccdd1b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 7 Sep 2024 08:52:52 +0200 Subject: [PATCH] Fix PHP warning (#9611) --- CHANGELOG.md | 2 +- program/actions/mail/index.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21dcdcd29d0..d7486df12db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unreleased - OAuth: Support standard authentication with short-living password received with OIDC token (#9530) -- Fix PHP deprecation warnings (#9616) +- Fix PHP warnings (#9616, #9611) ## Release 1.6.9 diff --git a/program/actions/mail/index.php b/program/actions/mail/index.php index 3285534c26d..f72c3f5378d 100644 --- a/program/actions/mail/index.php +++ b/program/actions/mail/index.php @@ -1189,7 +1189,11 @@ public static function washtml_callback($tagname, $attrib, $content, $washtml) $style[$idx] = $idx . ': ' . $val; } - $attrs['style'] = ($attrs['style'] ? trim($attrs['style'], ';') . '; ' : '') . implode('; ', $style); + if (isset($attrs['style'])) { + $attrs['style'] = trim($attrs['style'], '; ') . '; ' . implode('; ', $style); + } else { + $attrs['style'] = implode('; ', $style); + } } $out = html::tag('div', $attrs, $content);