1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/16912] Adjust code

PHPBB3-16912
This commit is contained in:
rxu
2021-12-24 20:44:15 +07:00
parent a0ced790e2
commit b305070e0a

View File

@@ -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)
{