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
}
$structure = [
'type' => $message->class,
'message' => $message->message,
'details' => $message->details,
'closeable' => $message->isCloseable()
'type' => $message->class,
'message' => $message->message,
'details' => $message->details,
'closeable' => $message instanceof MessageBox ? $message->isCloseable() : false,
];
if ($id === null ) {
if ($id === null) {
$_SESSION['messages'][] = $structure;
} else {
$_SESSION['messages'][$id] = $structure;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment