Most PHP errors caught by custom error handler not logged
- Status
- Open
- Subject
- Most PHP errors caught by custom error handler not logged
- Version
- 12.x
15.x
18.x - Category
- Bug
- Feature
- Logs (system & action)
- Resolution status
- New
- Submitted by
- Philippe Cloutier
- Lastmod by
- Philippe Cloutier
- Rating
- Description
- Most PHP errors are handled by initlib.php's tiki_error_handling(). This function was added by mose in r7041
(and completed in r7086
) to implement the "Show PHP error messages" button at the bottom of pages and have errors grouped rather than all over the place. Unfortunately, when a callback set with set_error_handler() does not return false, it also bypasses the default error handler, which may log errors. This means that no matter how PHP is configured, nor how Tiki is configured, errors triggered after lib/setup/error_reporting.php ran are not logged. - Files
- Solution
- The attached patch should fix. There is another huge bug which would persist though - error_reporting.php can set that error handler even in a request which does not show footer.tpl, meaning that errors in such requests are never displayed. Currently, this means that these errors are completely lost (with this fix, they will at least be logged).
- Importance
- 9
- Easy to solve?
- 7
- Priority
- 63
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 6861
- Created
- Thursday 11 October, 2018 20:14:39 UTC
by Philippe Cloutier - LastModif
- Saturday 06 July, 2024 10:21:44 UTC