mirror of
https://github.com/filp/whoops.git
synced 2026-09-13 03:06:20 +00:00
Fix #50, Handler::QUIT and Handler::LAST_HANDLER do the same thing :0
This commit is contained in:
+10
-11
@@ -190,22 +190,21 @@ class Run
|
||||
|
||||
$output = ob_get_clean();
|
||||
|
||||
// If we're allowed to, send output generated by handlers directly
|
||||
// to the output, otherwise, and if the script doesn't quit, return
|
||||
// it so that it may be used by the caller
|
||||
if($this->writeToOutput()) {
|
||||
echo $output;
|
||||
}
|
||||
|
||||
// Handlers are done! Check if we got here because of Handler::QUIT
|
||||
// ($handlerResponse will be the response from the last queried handler)
|
||||
// and if so, try to quit execution.
|
||||
if($this->allowQuit()) {
|
||||
echo $output;
|
||||
if($handlerResponse == Handler::QUIT && $this->allowQuit()) {
|
||||
exit;
|
||||
} else {
|
||||
// If we're allowed to, send output generated by handlers directly
|
||||
// to the output, otherwise, return it so that it may be used by
|
||||
// the caller.
|
||||
if($this->writeToOutput()) {
|
||||
echo $output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user