summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2014-02-20 12:08:12 (GMT)
committerNathaniel Catchpole2014-02-20 12:08:12 (GMT)
commitabe90a00dc9f89d9dd928c88d368b3bb56e590b3 (patch)
treea9ceebbd3c1b8d264d3f9a14219dd2ce29d99342
parente871186f8ed065b8e8016fa6e7410ae53f2f55d1 (diff)
Issue #2196805 by divesh.kumar: Convert all calls to check_plain() in core to Drupal\Component\Utility\String::checkPlain() in ban module.
-rw-r--r--core/modules/ban/lib/Drupal/ban/EventSubscriber/BanSubscriber.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/modules/ban/lib/Drupal/ban/EventSubscriber/BanSubscriber.php b/core/modules/ban/lib/Drupal/ban/EventSubscriber/BanSubscriber.php
index 6807cce..47035ee 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\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\ban\BanIpManager;
+use Drupal\Component\Utility\String;
/**
* Ban subscriber for controller requests.
@@ -45,7 +46,7 @@ class BanSubscriber implements EventSubscriberInterface {
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);
}
}