Skip to content

[FIX] Custom error handler reinforce error_reporting definition

Fabio Montefuscolo requested to merge rdcongo/tiki:error_reporting into 23.x

I am having a problem to suppress E_NOTICE and that is flooding my logs with entries I don't care. For some reason, when I try to set error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR or I select in Tiki the option Report all PHP errors except notices, E_NOTICEs still come to the screen and to the logs.

The following patch is an attempt to make things work predictably, like we probably would have without a custom error handler. It just checks if the error number belongs to the error_reporting levels defined.

Thanks for any help here!

Merge request reports