Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / EventSubscriber / FinalExceptionSubscriber.php
index 4317ff08cb387556992b58d1b630093334e44379..8cbf49d91a8e9fda3a884d0dd08ddba2d0e67897 100644 (file)
@@ -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 @@ class FinalExceptionSubscriber implements EventSubscriberInterface {
       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 @@ class FinalExceptionSubscriber implements EventSubscriberInterface {
 
         // 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);
       }
     }