Bug #31834

Error handler callback causes fatal error for parse time errors

Added by Marcus Krause over 9 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-11-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

TYPO3's error handler callback t3lib_error_ErrorHandler::handleError() causes a fatal error for PHP parse time errors.

If an error occurs during parse time (like E_DEPRECATED due to deprecated $foo =& stdClass() code), autoloading is not available and such PHP standard class 'Exception' (extended by t3lib_exception) is not resolvable. This results in a fatal and misleading error 'Class "Exception" not found' together with a not useful backtrace. Additionally this behaviour hides the original causing error (deprecated code).

Debugging this is a pain in the ass.

TYPO3's default error types which are registered in custom error handler are covering such deprecation errors. If users have such deprecated code ($foo =& stdClass()) somewhere in their legacy code, they will face the same situation.

E_DEPRECATED has been introduced in PHP 5.3.

The more users with existing TYPO3 installations are upgrading to TYPO3 4.6+ (and such PHP 5.3+), the more likely we will get and see such misleading fatal errors. I recommend to fix this as soon as possible.


Related issues

Related to TYPO3 Core - Bug #31827: Error handler registration accepts way too much PHP error typesClosed2011-11-15

Actions
#1

Updated by Mr. Hudson over 9 years ago

  • Status changed from New to Under Review

Patch set 1 of change I4ab97c1bf2d888022369f2095285cecc5a4c54a4 has been pushed to the review server.
It is available at http://review.typo3.org/6683

#2

Updated by Gerrit Code Review about 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6683

#3

Updated by Gerrit Code Review over 8 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6683

#4

Updated by Marcus Krause over 8 years ago

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

Updated by Gerrit Code Review over 8 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/14925

#6

Updated by Gerrit Code Review over 8 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/14926

#7

Updated by Gerrit Code Review over 8 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/14927

#8

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/14927

#9

Updated by Marcus Krause over 8 years ago

  • Status changed from Under Review to Resolved
#10

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF