diff core/modules/contact/src/Controller/ContactController.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents c2387f117808
children af1871eacc83
line wrap: on
line diff
--- a/core/modules/contact/src/Controller/ContactController.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/contact/src/Controller/ContactController.php	Thu Feb 28 13:21:36 2019 +0000
@@ -65,9 +65,9 @@
       // If there are no forms, do not display the form.
       if (empty($contact_form)) {
         if ($this->currentUser()->hasPermission('administer contact forms')) {
-          drupal_set_message($this->t('The contact form has not been configured. <a href=":add">Add one or more forms</a> .', [
+          $this->messenger()->addError($this->t('The contact form has not been configured. <a href=":add">Add one or more forms</a> .', [
             ':add' => $this->url('contact.form_add'),
-          ]), 'error');
+          ]));
           return [];
         }
         else {