From: Bryan Davis Date: Mon, 7 Nov 2016 17:30:09 +0000 (-0700) Subject: MWExceptionHandler: Do not use 'exception' for custom log data X-Git-Tag: 1.31.0-rc.0~4939 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=4a86be8ce4bdc8b923ff553f3b93b44fd6e2b450;p=lhc%2Fweb%2Fwiklou.git MWExceptionHandler: Do not use 'exception' for custom log data When we create an exception-like set of data for logging in MWExceptionHandler::handleFatalError, add it to the logging context as a 'fatal_exception' member. The 'exception' value in a log context should only be populated with a real Exception object. Bug: T150106 Change-Id: I253943849f19ed5480dbda7bfbc0bf607f69c47d --- diff --git a/includes/exception/MWExceptionHandler.php b/includes/exception/MWExceptionHandler.php index 736cb06a21..3d8ddb8fbb 100644 --- a/includes/exception/MWExceptionHandler.php +++ b/includes/exception/MWExceptionHandler.php @@ -284,7 +284,7 @@ TXT; $trace = $trace ?: debug_backtrace(); $logger = LoggerFactory::getInstance( 'fatal' ); $logger->error( $msg, [ - 'exception' => [ + 'fatal_exception' => [ 'class' => 'ErrorException', 'message' => "PHP Fatal Error: {$message}", 'code' => $level,