diff --git a/core/modules/ban/lib/Drupal/ban/EventSubscriber/BanSubscriber.php b/core/modules/ban/lib/Drupal/ban/EventSubscriber/BanSubscriber.php index 6807cce828edf7aef80e6835ac54106dae180e24..47035ee9d8aa301ac19a9e880da5fba62fd196e3 100644 --- a/core/modules/ban/lib/Drupal/ban/EventSubscriber/BanSubscriber.php +++ b/core/modules/ban/lib/Drupal/ban/EventSubscriber/BanSubscriber.php @@ -13,6 +13,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Drupal\ban\BanIpManager; +use Drupal\Component\Utility\String; /** * Ban subscriber for controller requests. @@ -45,7 +46,7 @@ public function __construct(BanIpManager $manager) { public function onKernelRequestBannedIpCheck(GetResponseEvent $event) { $ip = $event->getRequest()->getClientIp(); if ($this->manager->isDenied($ip)) { - $response = new Response('Sorry, ' . check_plain($ip) . ' has been banned.', 403); + $response = new Response('Sorry, ' . String::checkPlain($ip) . ' has been banned.', 403); $event->setResponse($response); } }