Skip to content
Snippets Groups Projects
Commit 8fc39a2c authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

check for MessageBox since only that class has the method isCloseable(), fixes #4342

Closes #4342

Merge request studip/studip!3146
parent 108ee37f
No related branches found
No related tags found
No related merge requests found
...@@ -601,13 +601,13 @@ class PageLayout ...@@ -601,13 +601,13 @@ class PageLayout
} }
$structure = [ $structure = [
'type' => $message->class, 'type' => $message->class,
'message' => $message->message, 'message' => $message->message,
'details' => $message->details, 'details' => $message->details,
'closeable' => $message->isCloseable() 'closeable' => $message instanceof MessageBox ? $message->isCloseable() : false,
]; ];
if ($id === null ) { if ($id === null) {
$_SESSION['messages'][] = $structure; $_SESSION['messages'][] = $structure;
} else { } else {
$_SESSION['messages'][$id] = $structure; $_SESSION['messages'][$id] = $structure;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment