Skip to content

Commit

Permalink
Fix MandrillHandler for swiftmailer >= 6.0.0 (#1676)
Browse files Browse the repository at this point in the history
  • Loading branch information
abryb committed Jun 9, 2022
1 parent 52ebd23 commit ea9d861
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Monolog/Handler/MandrillHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ protected function send($content, array $records)
{
$message = clone $this->message;
$message->setBody($content);
$message->setDate(time());
if (version_compare(\Swift::VERSION, '6.0.0', '>=')) {
$message->setDate(new \DateTimeImmutable());
} else {
$message->setDate(time());
}

$ch = curl_init();

Expand Down

0 comments on commit ea9d861

Please sign in to comment.