summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render
diff options
context:
space:
mode:
authorNathaniel Catchpole2018-11-08 14:14:15 (GMT)
committerNathaniel Catchpole2018-11-08 14:14:26 (GMT)
commitd43964bc692df771e35f779ac21e659a0e44f9a3 (patch)
tree4238147ca37debd1cb045356e81a44386d64dcaf /core/lib/Drupal/Core/Render
parentbad4f961ee3b16ae65cc80e3af967ff8c780334f (diff)
Issue #3002522 by andypost, Matthijs, tim.plunkett, wizonesolutions: Calling StatusMessages::renderMessages() with a returns a faulty render array
(cherry picked from commit e1b6d232b0ace32113565c9fb646a2c18bb921bb)
Diffstat (limited to 'core/lib/Drupal/Core/Render')
-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();