diff --git a/applications/garden/controllers/home.php b/applications/garden/controllers/home.php index a7633096beb..62163c18236 100755 --- a/applications/garden/controllers/home.php +++ b/applications/garden/controllers/home.php @@ -39,6 +39,7 @@ public function Index() { * is encountered. */ public function FileNotFound() { + header('Content-Type: text/html; charset=utf-8', true, 404); $this->Render(); } diff --git a/library/core/functions.error.php b/library/core/functions.error.php index d89d4d91517..e54b6db506d 100755 --- a/library/core/functions.error.php +++ b/library/core/functions.error.php @@ -26,7 +26,7 @@ function ErrorHandler($ErrorNumber, $Message, $File, $Line, $Arguments) { // Clean the output buffer in case an error was encountered in-page. @ob_end_clean(); - header('Content-Type: text/html; charset=utf-8'); + header('Content-Type: text/html; charset=utf-8', true, 500); $SenderMessage = $Message; $SenderObject = 'PHP';