Skip to content

Commit

Permalink
Suggestions by @nicolas-grekas to help, deserialize previously serial…
Browse files Browse the repository at this point in the history
…ized payloads
  • Loading branch information
mkrauser committed Nov 24, 2023
1 parent c28de13 commit 1bc7361
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@ 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];
}

/**
* @internal
*/
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);
}
Expand Down

0 comments on commit 1bc7361

Please sign in to comment.