From 2c09ca1623b512cd3d8f3bdc193db79203bd0c46 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 15 Oct 2014 13:14:51 +0200 Subject: [PATCH] Fix that retrieving notifications causes them to be dropped entirely I've broke this when doing some improvements while being brainless, obviously. --- library/Icinga/Web/Notification.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Web/Notification.php b/library/Icinga/Web/Notification.php index 04d3ac3fb..7c7ada67f 100644 --- a/library/Icinga/Web/Notification.php +++ b/library/Icinga/Web/Notification.php @@ -91,11 +91,12 @@ class Notification public function getMessages() { $session = Session::getSession(); - if (false === empty($session->messages)) { + $messages = $session->messages; + if (false === empty($messages)) { $session->messages = array(); } - return $session->messages; + return $messages; } final private function __construct()