Skip to content

Commit

Permalink
Sendlistener exception bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
cesurapp committed Aug 8, 2019
1 parent bdb0e99 commit fd676c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SwiftMailer/SendListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function sendPerformed(\Swift_Events_SendEvent $evt)
*/
public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt)
{
if ($this->bag->get('pd_mailer.logger_active')) {
if ($this->bag->get('pd_mailer.logger_active') && $this->log) {
// Update Data
$this->log->setStatus(\Swift_Events_SendEvent::RESULT_FAILED);
$this->log->addException($evt->getException()->getMessage().PHP_EOL);
Expand Down

0 comments on commit fd676c8

Please sign in to comment.