From 952f9219819ffe075f88903a475aa4c7e73f4a87 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 7 Aug 2011 12:28:58 +0000 Subject: [PATCH] Readd basic headers and ... arround error contents that was removed in r90993. This caused display errors of UTF-8 characters due to the lack of these things in a DBConnectionError exception. --- includes/Exception.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/includes/Exception.php b/includes/Exception.php index 5a972ca358..10a409cbd1 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -182,12 +182,25 @@ class MWException extends Exception { $wgOut->output(); } else { + header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki Error', true, 500 ); + header( 'Content-type: text/html; charset=UTF-8' ); + header( 'Cache-control: none' ); + header( 'Pragma: nocache' ); + $hookResult = $this->runHooks( get_class( $this ) . "Raw" ); if ( $hookResult ) { die( $hookResult ); } + echo " + + +" . $this->getPageTitle() . " + + +"; echo $this->getHTML(); + echo "\n"; die(1); } } -- 2.20.1