From b305070e0a9707529112beaa9c591d346d603fab Mon Sep 17 00:00:00 2001 From: rxu Date: Fri, 24 Dec 2021 20:44:15 +0700 Subject: [PATCH] [ticket/16912] Adjust code PHPBB3-16912 --- phpBB/includes/functions_messenger.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 36ce5344a5..eafbb01cf9 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1858,9 +1858,9 @@ function mail_encode($str, $eol = "\r\n") $scheme = $is_ascii ? 'Q' : 'B'; - // Define start delimimter, end delimiter + // Define start delimiter, end delimiter // Use the Quoted-Printable encoding for ASCII strings to avoid unnecessary encoding in Base64 - $start = $is_ascii ? '=?US-ASCII?' . $scheme . '?' : '=?UTF-8?' . $scheme . '?'; + $start = '=?' . ($is_ascii ? 'US-ASCII' : 'UTF-8') . '?' . $scheme . '?'; $end = '?='; // Maximum encoded-word length is 75 as per RFC 2047 section 2. @@ -1908,7 +1908,7 @@ function mail_encode($str, $eol = "\r\n") $is_quoted_printable && $line_length += strlen($char); } - if ('' !== $line_data) + if ($line_data !== '') { if (!$is_quoted_printable) {