Loading...
 
Skip to main content

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
(0)
Description
Most PHP errors are handled by initlib.php's tiki_error_handling(). This function was added by mose in r7041Question (and completed in r7086Question) 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
  1. Debug Restore PHP Error Logging
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+
Demonstrate Bug (older Tiki versions)
Ticket ID
6861
Created
Thursday 11 October, 2018 20:14:39 UTC
by Philippe Cloutier
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Show PHP error messages