Skip to content

Commit 1bc7361

Browse files
committed
Suggestions by @nicolas-grekas to help, deserialize previously serialized payloads
1 parent c28de13 commit 1bc7361

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,16 @@ public function markAsRendered(): void
100100
*/
101101
public function __serialize(): array
102102
{
103-
return [$this->htmlTemplate, $this->textTemplate, $this->context, $this->locale, parent::__serialize()];
103+
return [$this->htmlTemplate, $this->textTemplate, $this->context,parent::__serialize(), $this->locale];
104104
}
105105

106106
/**
107107
* @internal
108108
*/
109109
public function __unserialize(array $data): void
110110
{
111-
[$this->htmlTemplate, $this->textTemplate, $this->context, $this->locale, $parentData] = $data;
111+
[$this->htmlTemplate, $this->textTemplate, $this->context, $parentData] = $data;
112+
$this->locale = $data[4] ?? null;
112113

113114
parent::__unserialize($parentData);
114115
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy