Minimal reproduction:
$whoops = new \Whoops\Run();
$whoops->appendHandler(new \Whoops\Handler\PrettyPageHandler());
$whoops->register();
$whoops->unregister();
throw new Exception();
Opening this page shows the pretty page handler, which is unexpected since unregister() was called. This is happening because the shutdown function is picking up on the unhandled exception error.
Shutdown functions cannot be unregistered (there is no unregister_shutdown_function() in PHP); however they can be disabled by simply not doing anything and returning immediately, which I think would be the right solution here.
Minimal reproduction:
Opening this page shows the pretty page handler, which is unexpected since
unregister()was called. This is happening because the shutdown function is picking up on the unhandled exception error.Shutdown functions cannot be unregistered (there is no
unregister_shutdown_function()in PHP); however they can be disabled by simply not doing anything and returning immediately, which I think would be the right solution here.