Task #87281
closedErrorhandler handles errors without verifying the configured error level
100%
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
Updated by Gerrit Code Review almost 6 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
Updated by Gerrit Code Review almost 6 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
Updated by Gerrit Code Review almost 6 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
Updated by Gerrit Code Review almost 6 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
Updated by Gerrit Code Review almost 6 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
Updated by Gerrit Code Review almost 6 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
Updated by Gerrit Code Review almost 6 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Christoph Lehmann over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5913f4d9f34144d1a0596a6616e1f3e8c12c05e9.