From 028a6c442bff6a35d2259662fac08a7023b620a7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 17 Sep 2014 11:11:10 +0200 Subject: [PATCH] Fix persisting notification messages in the session --- library/Icinga/Web/Notification.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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()