[Mailer] Avoid reusing the same var names
This commit is contained in:
parent
418c8479b0
commit
829566cdea
@ -45,6 +45,11 @@ final class Mailer implements MailerInterface
|
||||
}
|
||||
|
||||
if (null !== $this->dispatcher) {
|
||||
$clonedMessage = clone $message;
|
||||
$clonedEnvelope = null !== $envelope ? clone $envelope : Envelope::create($clonedMessage);
|
||||
$event = new MessageEvent($clonedMessage, $clonedEnvelope, (string) $this->transport, true);
|
||||
$this->dispatcher->dispatch($event);
|
||||
|
||||
$message = clone $message;
|
||||
$envelope = null !== $envelope ? clone $envelope : Envelope::create($message);
|
||||
$event = new MessageEvent($message, $envelope, (string) $this->transport, true);
|
||||
|
Reference in New Issue
Block a user