File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
lib/internal/Magento/Framework/Mail/Template Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -416,14 +416,16 @@ protected function prepareMessage()
416
416
*/
417
417
private function addAddressByType (string $ addressType , $ email , ?string $ name = null ): void
418
418
{
419
- if (is_array ($ email )) {
419
+ if (is_string ($ email )) {
420
+ $ this ->messageData [$ addressType ][] = $ this ->addressConverter ->convert ($ email , $ name );
421
+ return ;
422
+ }
423
+ $ convertedAddressArray = $ this ->addressConverter ->convertMany ($ email );
424
+ if (isset ($ this ->messageData [$ addressType ])) {
420
425
$ this ->messageData [$ addressType ] = array_merge (
421
426
$ this ->messageData [$ addressType ],
422
- $ this -> addressConverter -> convertMany ( $ email )
427
+ $ convertedAddressArray
423
428
);
424
-
425
- return ;
426
429
}
427
- $ this ->messageData [$ addressType ][] = $ this ->addressConverter ->convert ($ email , $ name );
428
430
}
429
431
}
You can’t perform that action at this time.
0 commit comments