From: Michael Wallner Date: Fri, 20 Dec 2013 14:49:17 +0000 (+0100) Subject: dunno my own method names... X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=20206b5cd0c57f3939f106f94b84b7d7be8c009d;p=mdref%2Fmdref dunno my own method names... --- 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 +}