From 1bc73619f9a163689faa5ce66ef0fdd18e59b13e Mon Sep 17 00:00:00 2001 From: Matthias Krauser Date: Fri, 24 Nov 2023 21:23:28 +0100 Subject: [PATCH] Suggestions by @nicolas-grekas to help, deserialize previously serialized payloads --- src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php b/src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php index 23bfcb5c5a0d1..3a200358382cb 100644 --- a/src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php +++ b/src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php @@ -100,7 +100,7 @@ public function markAsRendered(): void */ public function __serialize(): array { - return [$this->htmlTemplate, $this->textTemplate, $this->context, $this->locale, parent::__serialize()]; + return [$this->htmlTemplate, $this->textTemplate, $this->context,parent::__serialize(), $this->locale]; } /** @@ -108,7 +108,8 @@ public function __serialize(): array */ public function __unserialize(array $data): void { - [$this->htmlTemplate, $this->textTemplate, $this->context, $this->locale, $parentData] = $data; + [$this->htmlTemplate, $this->textTemplate, $this->context, $parentData] = $data; + $this->locale = $data[4] ?? null; parent::__unserialize($parentData); }