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

Closed
opened 2023-01-13 00:18:14 -05:00 by dustinwilson · 1 comment
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 2023-01-13 00:18:14 -05:00
dustinwilson self-assigned this 2023-01-13 00:18:14 -05:00
Author
Owner

Fixed by 3ad4620d0c.

Fixed by 3ad4620d0c.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: MensBeam/Catcher#6
No description provided.