Skip to content

Commit

Permalink
Merge pull request #25 from 3064709/master
Browse files Browse the repository at this point in the history
Fix save&read serializable message
  • Loading branch information
nterms authored Dec 1, 2016
2 parents 560250f + 88efe74 commit f681f7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function queue($time_to_send = 'now')
$item->charset = $this->getCharset();
$item->subject = $this->getSubject();
$item->attempts = 0;
$item->swift_message = serialize($this);
$item->swift_message = base64_encode(serialize($this));
$item->time_to_send = date('Y-m-d H:i:s', $time_to_send);

$parts = $this->getSwiftMessage()->getChildren();
Expand Down
2 changes: 1 addition & 1 deletion models/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ public function rules()

public function toMessage()
{
return unserialize($this->swift_message);
return unserialize(base64_decode($this->swift_message));
}
}

0 comments on commit f681f7e

Please sign in to comment.