Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / ban / src / BanMiddleware.php
index 2c153fc0cac2c90e1cda98e5fd10e974ed70f65e..eda1fa0eb4185a49d470e91e5bc233ed9127f902 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace Drupal\ban;
 
-use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Render\FormattableMarkup;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
@@ -45,7 +45,7 @@ class BanMiddleware implements HttpKernelInterface {
   public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
     $ip = $request->getClientIp();
     if ($this->banIpManager->isBanned($ip)) {
-      return new Response(SafeMarkup::format('@ip has been banned', ['@ip' => $ip]), 403);
+      return new Response(new FormattableMarkup('@ip has been banned', ['@ip' => $ip]), 403);
     }
     return $this->httpKernel->handle($request, $type, $catch);
   }