Bug #46485

The exceptionhandler handles exceptions too strict

Added by Rens Admiraal over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2013-03-21
Priority:Should have Due date:
Assigned To:Rens Admiraal % Done:

100%

Category:-
Target version:-
Affected Flow version:Git master

Description

The ExceptionHandler should check if error_reporting is enabled. This is because we set the execptionhandler in testing context (for example).
In http://ca2.php.net/manual/en/language.operators.errorcontrol.php it's stated that even though the @ is used the exceptionhandler will be called if set_error_handler is used.

For this reason we should check in the exception handler if errors are ignored by using error_reporting() === 0

Associated revisions

Revision f4d459b7
Added by Rens Admiraal over 2 years ago

[BUGFIX] Make the AbstractExceptionHandler check for error_reporting()

When the shut-up operator is used in PHP the error_reporting level is
temporarly lowered to 0. The AbstractExceptionHandler does not check
for this, and outputs the exception whenever it is called.

This is a problem when the set_exception_handler method is used, as
PHP will still call those exception handlers even if the shut-up
operator is used. This is why the AbstractExceptionHandler should
check for error_reporting() === 0 and ignore the exception if so.

This change fixes the exit code 255 error during the compile run
which is thrown in the Testing context where we set E_WARNING to
be an exceptional error.

Change-Id: I7c7ef5c238792183bad915fc55c3620a35cb1222
Resolves: #46485
Releases: master, 2.0

Revision 706fee4a
Added by Rens Admiraal over 2 years ago

[BUGFIX] Make the AbstractExceptionHandler check for error_reporting()

When the shut-up operator is used in PHP the error_reporting level is
temporarly lowered to 0. The AbstractExceptionHandler does not check
for this, and outputs the exception whenever it is called.

This is a problem when the set_exception_handler method is used, as
PHP will still call those exception handlers even if the shut-up
operator is used. This is why the AbstractExceptionHandler should
check for error_reporting() === 0 and ignore the exception if so.

This change fixes the exit code 255 error during the compile run
which is thrown in the Testing context where we set E_WARNING to
be an exceptional error.

Change-Id: I7c7ef5c238792183bad915fc55c3620a35cb1222
Resolves: #46485
Releases: master, 2.0

Revision 07b753c6
Added by Rens Admiraal over 2 years ago

[BUGFIX] Make the AbstractExceptionHandler check for error_reporting()

When the shut-up operator is used in PHP the error_reporting level is
temporarly lowered to 0. The AbstractExceptionHandler does not check
for this, and outputs the exception whenever it is called.

This is a problem when the set_exception_handler method is used, as
PHP will still call those exception handlers even if the shut-up
operator is used. This is why the AbstractExceptionHandler should
check for error_reporting() === 0 and ignore the exception if so.

This change fixes the exit code 255 error during the compile run
which is thrown in the Testing context where we set E_WARNING to
be an exceptional error.

Change-Id: I7c7ef5c238792183bad915fc55c3620a35cb1222
Resolves: #46485
Releases: master, 2.0

History

#1 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19125

#2 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19126

#3 Updated by Rens Admiraal over 2 years ago

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

Applied in changeset commit:706fee4a2f7fa0a1c98b1177c28810b247919a45.

#4 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch composer has been pushed to the review server.
It is available at https://review.typo3.org/19374

#5 Updated by Rens Admiraal over 2 years ago

  • Status changed from Under Review to Resolved

Applied in changeset commit:07b753c68e66a4ca4631e1c42b73e1299d86208b.

Also available in: Atom PDF