summaryrefslogtreecommitdiff
path: root/framework/Exceptions/TErrorHandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Exceptions/TErrorHandler.php')
-rw-r--r--framework/Exceptions/TErrorHandler.php14
1 files changed, 1 insertions, 13 deletions
diff --git a/framework/Exceptions/TErrorHandler.php b/framework/Exceptions/TErrorHandler.php
index ad5fe662..8337f3be 100644
--- a/framework/Exceptions/TErrorHandler.php
+++ b/framework/Exceptions/TErrorHandler.php
@@ -199,19 +199,7 @@ class TErrorHandler extends TModule
'%%Time%%' => @strftime('%Y-%m-%d %H:%M',time())
);
- $CGI=substr(php_sapi_name(), 0, 3) == 'cgi'; // FastCGI / IIS
- if($isDebug)
- {
- if ($CGI)
- header("Status: $statusCode ".$exception->getMessage(), true, TPropertyValue::ensureInteger($statusCode));
- else
- header("HTTP/1.0 $statusCode ".$exception->getMessage(), true, TPropertyValue::ensureInteger($statusCode));
- } else {
- if ($CGI)
- header("Status: $statusCode", true, TPropertyValue::ensureInteger($statusCode));
- else
- header("HTTP/1.0 $statusCode", true, TPropertyValue::ensureInteger($statusCode));
- }
+ $this->getApplication()->getResponse()->setStatusCode($statusCode, $isDebug ? $exception->getMessage() : null);
echo strtr($content,$tokens);
}