mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
parent
e1dba6798f
commit
0207a61e9b
2 changed files with 5 additions and 3 deletions
|
@ -686,6 +686,9 @@ class CakeEmail {
|
|||
if ($email === $alias) {
|
||||
$return[] = $email;
|
||||
} else {
|
||||
if (strpos($alias, ',') !== false) {
|
||||
$alias = '"' . $alias . '"';
|
||||
}
|
||||
$return[] = sprintf('%s <%s>', $this->_encode($alias), $email);
|
||||
}
|
||||
}
|
||||
|
@ -1109,9 +1112,6 @@ class CakeEmail {
|
|||
$restore = mb_internal_encoding();
|
||||
mb_internal_encoding($this->_appCharset);
|
||||
}
|
||||
if (strpos($text, ',') !== false) {
|
||||
$text = '"' . $text . '"';
|
||||
}
|
||||
$return = mb_encode_mimeheader($text, $this->headerCharset, 'B');
|
||||
if ($internalEncoding) {
|
||||
mb_internal_encoding($restore);
|
||||
|
|
|
@ -395,6 +395,8 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$this->CakeEmail->subject('You have a new message.');
|
||||
$this->assertSame($this->CakeEmail->subject(), 'You have a new message.');
|
||||
|
||||
$this->CakeEmail->subject('You have a new message, I think.');
|
||||
$this->assertSame($this->CakeEmail->subject(), 'You have a new message, I think.');
|
||||
$this->CakeEmail->subject(1);
|
||||
$this->assertSame($this->CakeEmail->subject(), '1');
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue