- Issue created by @kksandr
- Open on Drupal.org →Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7last update
8 months ago Not currently mergeable. - last update
8 months ago PHPLint Failed - last update
8 months ago PHPLint Failed - last update
8 months ago PHPLint Failed - Issue was unassigned.
- Status changed to Needs review
8 months ago 5:05pm 29 June 2024 - last update
8 months ago PHPLint Failed - last update
8 months ago PHPLint Failed I don’t really understand why the session was used here, but it seems that every mail sending ends with logs being written and cleared, that is, there is no accumulation at the request level, so I’ll replace the log storage with a regular class property instead of a static one. If I'm wrong, the commit can be deleted.
- last update
8 months ago PHPLint Failed - last update
8 months ago PHPLint Failed - 🇷🇸Serbia holo96
Setting this to critical since core's Automated Cron is using KernelEvents::TERMINATE, and it is surely common to send emails from cron or queues
- 🇷🇸Serbia holo96
This is probably acceptable while while debug is enabled
So checking smtp_debugging before getting smtp_debug from session could also work, patch attached - 🇺🇸United States kerasai
Here's an updated version of the patch.
I moved the conditionals that would prevent debugging from being logged to the beginning of the method, so we can immediately return. I've also added a call to
headers_sent()
to avoid accessing the session ifTRUE
(headers have been sent).