Skip to content

Commit

Permalink
Update Log.php
Browse files Browse the repository at this point in the history
fix contact us
  • Loading branch information
daoduc410 authored Aug 7, 2017
1 parent 51c1b91 commit 368f03d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Model/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ public function saveLog($message, $status)
if ($message) {
$headers = $message->getHeaders();
$subject = $headers['Subject'][0];
$content = htmlspecialchars($message->getBodyHtml()->getRawContent());
$body = $message->getBodyHtml();
if (is_object($body)) {
$content = htmlspecialchars($body->getRawContent());
} else {
$content = htmlspecialchars($message->getBody()->getRawContent());
}
if ($subject) {
$this->setSubject($subject);
}
Expand Down

0 comments on commit 368f03d

Please sign in to comment.