Project

General

Profile

Actions

Bug #49645

closed

Logging PHP errors to sys_log table does not work

Added by Robert Vock almost 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Logging
Target version:
-
Start date:
2013-07-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

The default error handler does not write PHP errors to the sys_log table anymore.

The bug was introduced in changeset 3e309294309458279eef2adf08af6adb8ed4a867 when the link property of the DatabaseConnection was changed from public to private.

The TYPO3\CMS\Core\Error\ErrorHandler has a check for the link property which now returns false:

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

The one-liner fix would be to use the new method isConnected():

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

Actions

Also available in: Atom PDF