Skip to content

[Mailer] Handle null error_get_last() to prevent array offset error on SMTP auth failure #59351

@skmedix

Description

@skmedix

Symfony version(s) affected

6.4.13

Description

Since #53157, when we attempt to send an email and SMTP fails to authenticate due to an unexpected response code (e.g. "Too many failed login attempts"), it attempts to retrieve an error message from the error_get_last() function, even if the returned value is null. This results in an Trying to access array offset on value of type null error, rather than providing an explanation as to why an email was not sent.

How to reproduce

I'll try to make a reproducer in the next few days if it's still needed

Possible Solution

From my internal testing, only throwing $this->getReadConnectionDescription() when error_get_last() equals null correctly fallbacks to a correct error message.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy