Project

General

Profile

Actions

Task #87281

closed

Errorhandler handles errors without verifying the configured error level

Added by Christoph Lehmann over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-12-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I track errors with Sentry (getsentry.io) and the extension https://extensions.typo3.org/extension/sentry_client/ which uses https://github.com/getsentry/sentry-php

Its error handler is registered with E_ALL to get every error. That is nice, because Exceptions are enriched with additional informations.

When an error occurs it does its own handling and then forwards the error to \TYPO3\CMS\Core\Error\ErrorHandler. This is nice, because TYPO3 should do it normal error handling (Show error page, flashmessages, logging, etc.)

Currently there is no easy way to get the error level of an earlier instantiated error handler (See https://bugs.php.net/bug.php?id=54033)

So what Sentrys error handler does it to forward every error (even E_NOTICE) to \TYPO3\CMS\Core\Error\ErrorHandler and there every error is handled (Logging + Flashmessages).

A standard page in TYPO3

page = PAGE
page.10 = TEXT
page.10.value = Hello World

fires a lot of PHP notices resulting in 30ms+ for the code in \TYPO3\CMS\Core\Error\ErrorHandler::handleError which is not needed.

The shortest way to correct it is to check the configured error level in \TYPO3\CMS\Core\Error\ErrorHandler before handling an error

Actions #1

Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59287

Actions #2

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59287

Actions #3

Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59287

Actions #4

Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59287

Actions #5

Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59287

Actions #6

Updated by Gerrit Code Review over 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59287

Actions #7

Updated by Gerrit Code Review over 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59287

Actions #8

Updated by Gerrit Code Review about 5 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59287

Actions #9

Updated by Gerrit Code Review about 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60401

Actions #10

Updated by Christoph Lehmann about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF