Skip to content

Commit

Permalink
Change wordwrap to Text::wordwrap at CakeEmail for multi-byte
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 committed May 31, 2018
1 parent cfaa31c commit 8099090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mailer/Email.php
Expand Up @@ -2432,7 +2432,7 @@ protected function _wrap($message, $wrapLength = Email::LINE_LENGTH_MUST)
if (!preg_match('/<[a-z]+.*>/i', $line)) {
$formatted = array_merge(
$formatted,
explode("\n", wordwrap($line, $wrapLength, "\n", $cut))
explode("\n", Text::wordWrap($line, $wrapLength, "\n", $cut))
);
continue;
}
Expand All @@ -2453,7 +2453,7 @@ protected function _wrap($message, $wrapLength = Email::LINE_LENGTH_MUST)
if ($tmpLineLength > 0) {
$formatted = array_merge(
$formatted,
explode("\n", wordwrap(trim($tmpLine), $wrapLength, "\n", $cut))
explode("\n", Text::wordWrap(trim($tmpLine), $wrapLength, "\n", $cut))
);
$tmpLine = '';
$tmpLineLength = 0;
Expand Down

0 comments on commit 8099090

Please sign in to comment.