Bug #22562
closedError handler does not catch exception while connecting to DB
0%
Description
The base error handler (t3lib_error_ErrorHandler) tries to connect to the database if the connection doesn't yet exist (this can happen because the error handler may be called very early during TYPO3 initialization).
The DB connection method may throw exceptions if the connection failed. These exceptions should be caught by the error handler. No processing is needed, as there's nothing more that can be done anyway.
The effect of not having a DB connection is that DB-based logs cannot be used. t3lib_error_ErrorHandler::writeLog() does indeed check for DB connection existence before trying to write to the sys_log table. As for external tools, such as those called via t3lib_div::devLog() they just have to care for such a check themselves (extension "devlog" does this).
(issue imported from #M14275)
Files