-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of app->mail() crashes on php 8.1 #11
Comments
Thank you! What exactly is “the version of Swift Mailer used by this framework”? This framework can actually be used with multiple versions of any dependency – unless you are referring to major versions (e.g. Can you go to the root folder of your project, open the CLI there and run Can you also point to the bug report or issue for Swift Mailer, or name the first version of Swift Mailer where that |
From the composer.json in this project, it targets "^5.4". I believe that this major version is no longer supported, and Swift Mailer 6 has migrated into the Symphony project. The bug in Swift Mailer has since been fixed, but simply updating the dependency doesn't look like it will work. There appears to be a different method to construct Swift Mailer objects. If migrating to the new Swift Mailer framework requires too many changes in the short term, there's a quick fix. Instead of calling |
You can inspect how this works by looking at the SmtpTransport.php file in the Swift Mailer project |
Thanks! Will use the workaround you described, at least in the very short term, unless we can include the fix via a simple update of the dependency. In order to get the version of Swift Mailer, we really need the way I described before. Looking at |
Ah, I understand now (sorry). Looks like composer finds version 5.4.12. |
This is caused by calling the default newInstance() method. In the version of Swift Mailer used by this framework, newInstance() calls to strtolower(null) which crashes in php 8.1. In a later version of Swift Mailer, they fix this bug with strtolower(null ?? '').
The text was updated successfully, but these errors were encountered: