mirror of
https://github.com/filp/whoops.git
synced 2026-09-01 13:08:02 +00:00
Unregister/cleanup handler on destroy (#778)
Co-authored-by: pascal.heidmann <pascal.heidmann@check24.de>
This commit is contained in:
+6
-1
@@ -87,6 +87,11 @@ final class Run implements RunInterface
|
||||
$this->inspectorFactory = new InspectorFactory();
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
$this->unregister();
|
||||
}
|
||||
|
||||
/**
|
||||
* Explicitly request your handler runs as the last of all currently registered handlers.
|
||||
*
|
||||
@@ -531,7 +536,7 @@ final class Run implements RunInterface
|
||||
{
|
||||
if (!is_callable($filterCallback)) {
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
"A frame filter must be of type callable, %s type given.",
|
||||
"A frame filter must be of type callable, %s type given.",
|
||||
gettype($filterCallback)
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user