From 20206b5cd0c57f3939f106f94b84b7d7be8c009d Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 20 Dec 2013 15:49:17 +0100 Subject: [PATCH] dunno my own method names... --- mdref/ExceptionHandler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mdref/ExceptionHandler.php b/mdref/ExceptionHandler.php index 0edf728..1c9b7da 100644 --- a/mdref/ExceptionHandler.php +++ b/mdref/ExceptionHandler.php @@ -19,7 +19,7 @@ class ExceptionHandler try { echo static::html($e); } catch (\Exception $ignore) { - HTTP::sendStatusCode(500); + headers_sent() or HTTP::setResponseCode(500); } } else { throw new \Exception($msg, $e); @@ -39,7 +39,7 @@ class ExceptionHandler if ($e instanceof \http\Controller\Exception) { $code = $e->getCode() ?: 500; foreach ($e->getHeaders() as $key => $val) { - HTTP::sendResponseHeader($key, $val); + HTTP::setResponseHeader($key, $val); } } else { $code = 500; @@ -55,4 +55,4 @@ class ExceptionHandler } return $html; } -} \ No newline at end of file +} -- 2.30.2