Don't add E_ERROR back to error reporting level if level is changed outside of Catcher #6

Closed
opened 1 year ago by dustinwilson · 1 comments
Owner

If error_reporting is set to something outside of Catcher after Catcher is instantiated then that should be assumed to be what is wanted as the error reporting level.

Example:

$catcher = new Catcher();
error_reporting(\E_ALL & ~\E_ERROR);
$catcher->unregister();
echo error_reporting();

Output:

32767 // E_ALL

The actual output should be:

32766 // E_ALL & ~E_ERROR

This is because the reporting level was explicitly set again after Catcher instantiated.

If `error_reporting` is set to something outside of Catcher after Catcher is instantiated then that should be assumed to be what is wanted as the error reporting level. Example: ``` $catcher = new Catcher(); error_reporting(\E_ALL & ~\E_ERROR); $catcher->unregister(); echo error_reporting(); ``` Output: ``` 32767 // E_ALL ``` The actual output should be: ``` 32766 // E_ALL & ~E_ERROR ``` This is because the reporting level was explicitly set again after Catcher instantiated.
dustinwilson added the
bug
label 1 year ago
dustinwilson self-assigned this 1 year ago
Poster
Owner

Fixed by 3ad4620d0c.

Fixed by 3ad4620d0c.
dustinwilson closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.