You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[3.0]: Errors logged in PHP log, not SMF log #8343
I've seen a fair amount of this, I think somewhere along the line our standard error routine gets stuffed in a locker...
I believe the most common factor is cron jobs, but one of these examples is being run via SMF\Forum->execute().
Some examples: #8342 - Two issues, one was in the PHP log, not the SMF log; for the 2nd the error was in the .html for the export instead of any log at all.
Your two examples are a fatal error, which isn't catchable by PHP. There are workarounds. https://stackoverflow.com/questions/277224/how-do-i-catch-a-php-fatal-e-error-error
The register_shutdown_function is not like other functions. Only the last registered function is executed, so if something else calls it after we do, it becomes the shutdown function.
There is an ob method as well that may work.
I am thinking it's not worth us trying to catch it if we are dealing with a fatal error. It may not be possible for the code to function.
Activity
jdarwood007 commentedon Jul 2, 2025
Your two examples are a fatal error, which isn't catchable by PHP. There are workarounds. https://stackoverflow.com/questions/277224/how-do-i-catch-a-php-fatal-e-error-error
The register_shutdown_function is not like other functions. Only the last registered function is executed, so if something else calls it after we do, it becomes the shutdown function.
There is an ob method as well that may work.
I am thinking it's not worth us trying to catch it if we are dealing with a fatal error. It may not be possible for the code to function.
sbulen commentedon Jul 2, 2025
Yeah sounds like this should be closed as not planned.
I just don't recall seeing so many errors in the PHP log vs the SMF log.
If I see one for a non-fatal error, I'll open a new issue.