diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2015-02-24 04:37:20 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2015-02-24 04:37:20 +0300 |
commit | 3372aa3ed4c023112b71be664c1ccad564c05419 (patch) | |
tree | 2316b3c0e41dad8feb5210ed2e2c24460d8bcc1f /core/Notification | |
parent | 9d8eaf0da30fd3db1870659e7236a292149bfd9b (diff) |
refs #7274 If session is writable do not remove or add a notification
Please do not directly merge. First I want to understand which notification it wants to trigger in Goals overview.
Haven't tested it!
Diffstat (limited to 'core/Notification')
-rw-r--r-- | core/Notification/Manager.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Notification/Manager.php b/core/Notification/Manager.php index 921dc3fb82..d356289876 100644 --- a/core/Notification/Manager.php +++ b/core/Notification/Manager.php @@ -9,6 +9,7 @@ namespace Piwik\Notification; use Piwik\Notification; +use Piwik\Session; use Piwik\Session\SessionNamespace; /** @@ -103,6 +104,10 @@ class Manager private static function addNotification($id, Notification $notification) { + if (!Session::isWritable()) { + return; + } + $session = static::getSession(); $session->notifications[$id] = $notification; } @@ -116,6 +121,10 @@ class Manager private static function removeNotification($id) { + if (!Session::isWritable()) { + return; + } + $session = static::getSession(); if (array_key_exists($id, $session->notifications)) { unset($session->notifications[$id]); |