summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render/Element/StatusMessages.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/lib/Drupal/Core/Render/Element/StatusMessages.php')
-rw-r--r--core/lib/Drupal/Core/Render/Element/StatusMessages.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/Render/Element/StatusMessages.php b/core/lib/Drupal/Core/Render/Element/StatusMessages.php
index a5a2842..d862734 100644
--- a/core/lib/Drupal/Core/Render/Element/StatusMessages.php
+++ b/core/lib/Drupal/Core/Render/Element/StatusMessages.php
@@ -76,7 +76,9 @@ class StatusMessages extends RenderElement {
public static function renderMessages($type = NULL) {
$render = [];
if (isset($type)) {
- $messages = \Drupal::messenger()->deleteByType($type);
+ $messages = [
+ $type => \Drupal::messenger()->deleteByType($type),
+ ];
}
else {
$messages = \Drupal::messenger()->deleteAll();