diff --git a/Notification/NotificationPool.php b/Notification/NotificationPool.php index eb30916d1..230698068 100644 --- a/Notification/NotificationPool.php +++ b/Notification/NotificationPool.php @@ -78,6 +78,8 @@ private function translateMessage(TranslatableNotificationMessage $message) public function onKernelResponse(FilterResponseEvent $event) { - $this->session->getFlashBag()->set('notification', $this->notifications); + if ($this->notifications) { + $this->session->getFlashBag()->set('notification', $this->notifications); + } } }