Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / ban / src / Form / BanAdmin.php
index 5d8e7957f8064af857170cf85addd898545a5811..d71be8d40259d3910744b2ba30ca474164071ae2 100644 (file)
@@ -120,7 +120,7 @@ class BanAdmin extends FormBase {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     $ip = trim($form_state->getValue('ip'));
     $this->ipManager->banIp($ip);
-    drupal_set_message($this->t('The IP address %ip has been banned.', ['%ip' => $ip]));
+    $this->messenger()->addStatus($this->t('The IP address %ip has been banned.', ['%ip' => $ip]));
     $form_state->setRedirect('ban.admin_page');
   }