Browse Source

Switch http code header on showDebug with ErrorHTTPException.

master
Alexander Demidov 12 years ago
parent
commit
6a2c861a71
  1. 4
      app/FrontController.php

4
app/FrontController.php

@ -131,8 +131,12 @@ class FrontController
} catch (Exception $e) {
if (Config::get('DEBUG')) {
if (!headers_sent()) {
if ($e instanceof ErrorHTTPException) {
header($e->getHTTPHeader());
} else {
header('HTTP/1.0 500 Internal Server Error');
}
}
return ErrorHandler::showDebug($e);
}
$layout_class = $this->getRouter()->getErrorLayout();

Loading…
Cancel
Save