Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php Tue Jul 10 15:07:59 2018 +0100 +++ b/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php Thu Feb 28 13:21:36 2019 +0000 @@ -2,7 +2,7 @@ namespace Drupal\Core\EventSubscriber; -use Drupal\Component\Utility\SafeMarkup; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Utility\Error; @@ -98,10 +98,10 @@ if (!$this->isErrorLevelVerbose()) { // Without verbose logging, use a simple message. - // We call SafeMarkup::format directly here, rather than use t() since - // we are in the middle of error handling, and we don't want t() to - // cause further errors. - $message = SafeMarkup::format('%type: @message in %function (line %line of %file).', $error); + // We use \Drupal\Component\Render\FormattableMarkup directly here, + // rather than use t() since we are in the middle of error handling, and + // we don't want t() to cause further errors. + $message = new FormattableMarkup('%type: @message in %function (line %line of %file).', $error); } else { // With verbose logging, we will also include a backtrace. @@ -119,7 +119,7 @@ // Generate a backtrace containing only scalar argument values. $error['@backtrace'] = Error::formatBacktrace($backtrace); - $message = SafeMarkup::format('%type: @message in %function (line %line of %file). <pre class="backtrace">@backtrace</pre>', $error); + $message = new FormattableMarkup('%type: @message in %function (line %line of %file). <pre class="backtrace">@backtrace</pre>', $error); } }