global $wgSitename;
$args = array_slice( func_get_args(), 2 );
+ // FIXME: Keep logic in sync with MWExceptionRenderer::msg.
$res = false;
if ( $this->useMessageCache() ) {
try {
$res = wfMsgReplaceArgs( $fallback, $args );
// If an exception happens inside message rendering,
// {{SITENAME}} sometimes won't be replaced.
- $res = preg_replace( '/\{\{SITENAME\}\}/', $wgSitename, $res );
+ $res = strtr( $res, [
+ '{{SITENAME}}' => $wgSitename,
+ ] );
}
return $res;
}
"Fatal exception of type $1",
$type,
$logId,
- MWExceptionHandler::getURL( $this )
+ MWExceptionHandler::getURL()
)
) ) .
"<!-- Set \$wgShowExceptionDetails = true; " .