Fix #50, Handler::QUIT and Handler::LAST_HANDLER do the same thing :0

This commit is contained in:
filp
2013-06-07 21:38:22 +01:00
parent 88d0c57ac4
commit 703c10a7e9
+10 -11
View File
@@ -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;
}
/**