Welcome Guest, Not a member yet? Register   Sign In
Error_Reporting level being ignored when using custom error handler
#1

I have written a basic library that sets a custom error handler, using `set_error_handler()`, that allows me to log the errors myself.

As expected, with `error_reporting(E_ALL)` set, I get logs for simple PHP notices (such as an undefined variable).

However, if I change the level to `E_ERROR`, I am still seeing the notices in the error logs.

If I remove my custom error handler, the logged errors are those that match the error_reporting.

So why isn't the level being adhered to when using a custom error handler?

Is it something I need to implement in my handler? (As in, the default error handler has code to use the error_reporting level?)
Reply




Theme © iAndrew 2016 - Forum software by © MyBB