mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #424] SwiftMailerHandler::send clone message date issue #146
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#146
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fyrye on GitHub (Sep 23, 2014).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/424
The message is cloned resulting in the initial date from instantiation remaining which is inaccurate.
https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/SwiftMailerHandler.php
Propose
Add getMessage() method in order for manual altering of message
or
Add $message->setDate(time()) to the send method after cloning.
For example a long running script that runs for any length of time would send an email message with a date from the past as opposed to the actual date it was sent.
@Seldaek commented on GitHub (Sep 29, 2014):
Thanks for the hint, I fixed it with your second proposal.