You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the swift mail handler in my Laravel app and I started to notice recently that monolog handler was raising an error within itself when trying to pipe out to emails, like so:
PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Monolog\Handler\SwiftMailerHandler::getSubjectFormatter() must be of the type string, null given, called in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php on line 84 and defined in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php:57
Stack trace:
#0 /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php(84): Monolog\Handler\SwiftMailerHandler->getSubjectFormatter(NULL)
#1 /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php(49): Monolog\Handler\SwiftMailerHandler->buildMessage('<h1 style="back...', Array)
#2 /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php(56): Monolog\Handler\SwiftMailerHandler->send('<h1 style="back...', Array)
#3 /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(42): Monolog\Handl
I have been doing some extra investigation into this, finding that something has changed in recent versions of monolog which means that now I must explicitly put the subject into the message that I send into the handler.
This is a bit annoying since I want a subject based on the error contents, is this intentional and if not is there a way to replicate this functionality in newer versions?
The text was updated successfully, but these errors were encountered:
Monolog version 2
I use the swift mail handler in my Laravel app and I started to notice recently that monolog handler was raising an error within itself when trying to pipe out to emails, like so:
I have been doing some extra investigation into this, finding that something has changed in recent versions of monolog which means that now I must explicitly put the subject into the message that I send into the handler.
This is a bit annoying since I want a subject based on the error contents, is this intentional and if not is there a way to replicate this functionality in newer versions?
The text was updated successfully, but these errors were encountered: