Skip to content
Snippets Groups Projects
Commit 60689bd8 authored by Tim van Dijen's avatar Tim van Dijen Committed by Tim van Dijen
Browse files

Set HTTP status code on response

parent 86b5a399
Branches
Tags
No related merge requests found
......@@ -222,8 +222,6 @@ class Error extends Exception
*/
public function show()
{
$this->setHTTPCode();
// log the error message
$this->logError();
......@@ -265,10 +263,12 @@ class Error extends Exception
$show_function = $config->getArray('errors.show_function', null);
if (isset($show_function)) {
assert(is_callable($show_function));
$this->setHTTPCode();
call_user_func($show_function, $config, $data);
assert(false);
} else {
$t = new Template($config, 'error.php', 'errors');
$t->setStatusCode($this->httpCode);
$t->data = array_merge($t->data, $data);
$t->show();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment