diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-02-20 01:00:08 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-02-20 01:00:08 +0300 |
commit | 351c11344efe03949bf916415e44b2ec5a21cb70 (patch) | |
tree | a79ed04ef91fb0eeb97aa7d8f33c3c8f15ba487b /core/Session | |
parent | ef3c4660127e03d3da8b3176963ae40f8218b4db (diff) |
refs #7104 This should prevent from accidentally starting a Zend_Session.
Sometimes, eg when module=API, we do not start a session. If any code
part during such a request uses SessionNamespace although we did not start
a session, Zend_Session_Namespace will start a Zend_Session which does not
respect our configuration. It would use default Zend Session options
and therefore probably file based sessions. Therefore, we force the
creation of a "Piwik session". If we have created the session before it
won't be started again.
Diffstat (limited to 'core/Session')
-rw-r--r-- | core/Session/SessionNamespace.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/Session/SessionNamespace.php b/core/Session/SessionNamespace.php index 74b11e0ce8..90a46625ff 100644 --- a/core/Session/SessionNamespace.php +++ b/core/Session/SessionNamespace.php @@ -9,6 +9,7 @@ namespace Piwik\Session; use Piwik\Common; +use Piwik\Session; use Zend_Session_Namespace; /** @@ -28,6 +29,8 @@ class SessionNamespace extends Zend_Session_Namespace return; } + Session::start(); + parent::__construct($namespace, $singleInstance); } } |