From bc470f366109dd04a87688eb569e2ec32b3aa717 Mon Sep 17 00:00:00 2001
From: Alexandre Emsenhuber
Date: Thu, 28 Jun 2012 11:52:43 +0200
Subject: [PATCH] Send correct HTML when reporting a MWException object and the
OuputPage object cannot be used.
Currently only the body was sent, without doc type, , or items.
Change-Id: I2d5cc3f69f55d0e1b212148f57f736f100bd2554
---
includes/Exception.php | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/includes/Exception.php b/includes/Exception.php
index 502f2ade16..6e1325ff50 100644
--- a/includes/Exception.php
+++ b/includes/Exception.php
@@ -128,10 +128,10 @@ class MWException extends Exception {
'
Backtrace:
' . nl2br( htmlspecialchars( $this->getTraceAsString() ) ) .
"
\n";
} else {
- return
+ return
"" .
'[' . $this->getLogId() . '] ' .
- gmdate( 'Y-m-d H:i:s' ) .
+ gmdate( 'Y-m-d H:i:s' ) .
": Fatal exception of type " . get_class( $this ) . "
\n" .
"