diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index dea0b8c98e..22b49234c8 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -462,7 +462,7 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia */ function drupal_set_message($message = NULL, $type = 'status', $repeat = FALSE) { @trigger_error('drupal_set_message() is deprecated Drupal 8.5.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead. See https://www.drupal.org/node/2774931', E_USER_DEPRECATED); - $messenger = \Drupal::messenger(); + $messenger = \Drupal::service('messenger'); $messenger->addMessage($message, $type, $repeat); return $messenger->all(); }