diff options
-rw-r--r-- | libs/Zend/Session.php | 7 | ||||
-rw-r--r-- | tests/resources/sessionStarter.php | 4 |
2 files changed, 11 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()); 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 |