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
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 /tests/resources/sessionStarter.php
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 'tests/resources/sessionStarter.php')
-rw-r--r--tests/resources/sessionStarter.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/resources/sessionStarter.php b/tests/resources/sessionStarter.php
index 48a4954934..b1e62ecc0a 100644
--- a/tests/resources/sessionStarter.php
+++ b/tests/resources/sessionStarter.php
@@ -10,6 +10,8 @@
* serverStaticFile.test.php has been created to avoid making too many modifications to /tests/core/Piwik.test.php
*/
use Piwik\FrontController;
+use Piwik\Nonce;
+
session_start(); // matomo should not fail if session was started by someone else
define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__).'/../../');
if(file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) {
@@ -29,4 +31,6 @@ try {
}
FrontController::getInstance()->init();
+Nonce::getNonce('test');
+
echo 'ok'; \ No newline at end of file