-
Notifications
You must be signed in to change notification settings - Fork 714
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
PHP 8 focused error handler should also accept PHP 7 notices #736
Comments
I'm running the same Smarty 4.1 app on a PHP 8.0 and a PHP 7.4 machine, and the error handler only works as expected on PHP 8.0. I have my app's error handler checking for Smarty notices now =( |
I am also running into this issue, the PR attached resolved the problem. Thanks @rudiedirkx. Any word on when this will be merged/released @wisskid? |
@Rambomst do you have a code example that triggers the error? I'll add a unit test and merge it asap |
Honestly, no. We do set the error_reporting value for smarty by doing:
This is happening in a monolithic application and I was only able to validate this working by manually modifying the vendor file on a dev server, unfortunately I don't have a neat snippet. I am happy to provide as much information as I can, let me know if you need anything else. This is happening on PHP 7.2.34 and we are using Sentry error reporting which does some error handling itself. Sorry I'm not more helpful :( |
…OrNullWarnings is activated. Fixes #736
Smarty_Internal_ErrorHandler::handleError()
only checks for PHP 8 style error strings, but not "Undefined index: abc". I can do that somewhere else, or not listen for notices, but why not here where the same logic for PHP 8 lives.Probably add inside the
allowUndefinedArrayKeys
block:Undefined index:
The text was updated successfully, but these errors were encountered: