From 4dcbf284ccaa2048fb7d738312231e2a4992c614 Mon Sep 17 00:00:00 2001 From: Anton Terekhov Date: Wed, 1 Jun 2011 22:25:06 +0400 Subject: [PATCH] If DEBUG - send exception as HTTP 500 --- app/FrontController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/FrontController.php b/app/FrontController.php index 6142f2e..b7461db 100644 --- a/app/FrontController.php +++ b/app/FrontController.php @@ -121,6 +121,9 @@ class FrontController return (!DEBUG) ? $html : Profiler::getInstance()->end($html); } catch(Exception $e) { if (DEBUG == true) { + if (!headers_sent()) { + header('HTTP/1.0 500 Internal Server Error'); + } return ErrorHandler::showDebug($e); } $layout = new ErrorLayout();