Issue Bug Closed

#67703No logging to sysLog in ExceptionHandler

Felix Nagel 06/23/15, 18:42 updated 10/02/18, 11:44

Description

The sysext/core/Classes/Error/AbstractExceptionHandler.php class has a writeLog method which should write new entries to the sys_log table. It seems this is broken.

Within the method there is a check for proper DB connection:

if (is_object($GLOBALS['TYPO3_DB']) && !empty($GLOBALS['TYPO3_DB']->link)) {

The second check for link will always fail as the link property of TYPO3\CMS\Core\Database\DatabaseConnection is protected.
Perhaps this was caused due to a visibility change?

This should be handled like in typo3/sysext/core/Classes/Error/ErrorHandler.php

if (is_object($GLOBALS['TYPO3_DB']) && $GLOBALS['TYPO3_DB']->isConnected()) {

Tested in TYPO3 CMS 6.2.12 and 7.3

Reviews 2