I am trying to register a shutdown function to register a fatal error. Good stuff if it works for my class ...
Inside the method, I do this:
register_shutdown_function(array($this, 'handleFatalError'));
handleFatalError is not static, and it is publicly available:
public function handleFatalErrors() {
if(is_null($e = error_get_last()) === false) {
}
}
PHP says:
Warning: register_shutdown_function () [Function.register shutdown function]: Invalid shutdown callback 'ErrorManager :: handleFatalError' passed to ...
Why is this invalid callback?
source
share