-
Notifications
You must be signed in to change notification settings - Fork 2
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
mail() PHP 7.1 compatibility - Escaped command exceeds the allowed length #68
Comments
Adrian, where are you seeing the error message? I'm guessing in the wire/core/WireMail.php file mail() command, but just wanted to double check that's what you are talking about? |
Yes, exactly! Sorry for not being clear on that. |
…P 7.1 mail() bug
Now that I think about it, all of our mail() have been converted to WireMail, so that's likely the only one there is in PW. Looking at the mail function docs on php.net, it seems like this is likely a bug in PHP 7.1, but it's easy enough to workaround–I've pushed an update that fixes it. Thanks. |
Thanks - looks good! |
…P 7.1 mail() bug
Short description of the issue
With php 7.1 you get that fatal error message because the $param variable is blank
Expected behavior
No error
Actual behavior
Fatal error message
Optional: Suggestion for a possible fix
So long as $param is not null it seems to work fine. I got this tip from this: PHPMailer/PHPMailer#861
I know you already check for null and set to an empty string, but perhaps 7.1 is for some reason considering
''
as null in this case?So long as $param contains something more than an empty string the error goes away.
Setup/Environment
The text was updated successfully, but these errors were encountered: