Skip to content

Commit

Permalink
Fix serialized field names in PersistableMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
hakito committed Jul 5, 2020
1 parent 6862b03 commit d64dc06
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mailer/PersistableMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ public function __construct(Message $email = null)
if ($email === null)
return;
$this->createFromArray($email->jsonSerialize());
$this->_message = $email->message;
$this->_htmlMessage = $email->htmlMessage;
$this->_textMessage = $email->textMessage;
$this->message = $email->message;
$this->htmlMessage = $email->htmlMessage;
$this->textMessage = $email->textMessage;
}

public function jsonSerialize(): array
{
$array = parent::jsonSerialize();

$properties = ['_message', '_htmlMessage', '_textMessage'];
$properties = ['message', 'htmlMessage', 'textMessage'];
foreach($properties as $property)
$array[$property] = $this->{$property};
return $array;
Expand Down

0 comments on commit d64dc06

Please sign in to comment.