Force exception conversion to string when logging

This commit is contained in:
fabrixxm 2021-03-27 10:58:19 +01:00
parent e409ffcf06
commit 1666958ad0
2 changed files with 2 additions and 2 deletions

View file

@ -105,6 +105,6 @@ function phpmailer_emailer_send_prepare(App $a, IEmail &$email)
$email = null;
}
} catch (Exception $e) {
DI::logger()->error('PHPMailer error', ['email' => $email, 'ErrorInfo' => $mailer->ErrorInfo, 'exception' => $e]);
DI::logger()->error('PHPMailer error', ['email' => $email, 'ErrorInfo' => $mailer->ErrorInfo, 'exception' => $e->__toString()]);
}
}

View file

@ -142,6 +142,6 @@ function securemail_emailer_send_prepare(App &$a, IEmail &$email)
$email = $email->withMessage($armored_encrypted, null);
} catch (Exception $e) {
DI::logger()->warning('Encryption failed.', ['email' => $email, 'exception' => $e]);
DI::logger()->warning('Encryption failed.', ['email' => $email, 'exception' => $e->__toString()]);
}
}