Skip to content
Permalink
Browse files

Change wordwrap to Text::wordwrap at CakeEmail for multi-byte

  • Loading branch information...
seto1 committed May 31, 2018
1 parent cfaa31c commit 8099090c919e77bd6fc80958f4d2e765f7c41e69
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Mailer/Email.php
@@ -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;
}
@@ -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;

0 comments on commit 8099090

Please sign in to comment.
You can’t perform that action at this time.