Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2019-10-02 23:57:10 +0300
committerGitHub <noreply@github.com>2019-10-02 23:57:10 +0300
commitdb30cea797f7bb112bd93a5e7537e779c06d72dd (patch)
tree8b3a50ee776468a02aea1d9c3fec8131fca79b80 /libs
parent458fd5ca7ad1224c9fd5d49b8c9d6628b3648bd7 (diff)
Fix error session already started (#14914)
* Fix error session already started Got this error when going on eg `index.php?module=PrivacyManager&action=privacySettings&idSite=1&period=week&date=2019-09-20` and a session was started by another tool. That page uses NONCE which then uses SessionNamespace which then wants to start the session even though it was already started. I don't think I can write a test for it but need to see. * add test
Diffstat (limited to 'libs')
-rw-r--r--libs/Zend/Session.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/Zend/Session.php b/libs/Zend/Session.php
index 8b55a17b6d..38c8a1ba86 100644
--- a/libs/Zend/Session.php
+++ b/libs/Zend/Session.php
@@ -424,6 +424,13 @@ class Zend_Session extends Zend_Session_Abstract
return; // already started
}
+ if (session_status() === PHP_SESSION_ACTIVE) {
+ parent::$_readable = true;
+ parent::$_writable = true;
+ self::$_sessionStarted = true;
+ return;
+ }
+
// make sure our default options (at the least) have been set
if (!self::$_defaultOptionsSet) {
self::setOptions(is_array($options) ? $options : array());