diff --git a/library/Icinga/Web/Notification.php b/library/Icinga/Web/Notification.php index b9cc839ab..c61076cff 100644 --- a/library/Icinga/Web/Notification.php +++ b/library/Icinga/Web/Notification.php @@ -75,13 +75,11 @@ class Notification return; } - $mo = (object) array( + $messages = Session::getSession()->getByRef('messages'); + $messages[] = (object) array( 'type' => $type, 'message' => $message, ); - - $session = Session::getSession(); - $session->messages[] = $mo; } public function hasMessages()