Feature #29358

Enable use of @ (shut-up-operator)

Added by Ferdinand Kuhl almost 4 years ago. Updated almost 4 years ago.

Status:Resolved Start date:2011-08-30
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:Error
Target version:-
PHP Version: Complexity:
Has patch:

Description

The FLOW3 error and exception handler does a good job. But if you have to integrate foreign code, suppressing foreign errors (E_STRICT or similar) is the only possibility to get this code to work.

PHP suggests to check (error_reporting() === 0) in order to realize if error_handling have been temporarily disabled.

I temporarily added to lines to the ErrorHandler::handleError function:

1if(error_reporting() === 0)
2            return;

Associated revisions

Revision 1cf1c897
Added by Ferdinand Kuhl almost 4 years ago

[FEATURE] Enable use of @ (shut-up-operator)

By default, FLOW3 makes sure to convert any error into an exception
so that even notices don't go undiscovered.

But foreign code is not always clean and so E_NOTICE or E_STRICT
are quite common. If one doesn't want to deactivate this kinds of errors
generally the @-Operator is the only way to temporarily disable
error-reporting.

This patch allows the error-handler to return immediately if it
detects that the parent function made use of the shut-up
operator

Change-Id: Id8d70b594e69e0de390b29624304de32442a74e4
Resolves: #29358

History

#1 Updated by Karsten Dambekalns almost 4 years ago

  • Tracker changed from Bug to Feature

#2 Updated by Karsten Dambekalns almost 4 years ago

  • Subject changed from @error-controler-operater is ignored to Enable use of @ (shut-up-operator)
  • Category set to Error

#3 Updated by Mr. Hudson almost 4 years ago

  • Status changed from New to Under Review

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

#4 Updated by Ferdinand Kuhl almost 4 years ago

Ah! And I do think that ignoring the @-Operator is more a bug than a feature... but thats just personal opinion.

#5 Updated by Mr. Hudson almost 4 years ago

Patch set 2 of change Id8d70b594e69e0de390b29624304de32442a74e4 has been pushed to the review server.
It is available at http://review.typo3.org/4754

#6 Updated by Ferdinand Kuhl almost 4 years ago

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

Also available in: Atom PDF