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>2020-06-10 23:17:10 +0300
committerGitHub <noreply@github.com>2020-06-10 23:17:10 +0300
commit5dd7d4fbc323cf8a506d928cb0827f4f7d656a2e (patch)
treee044ba23cd5184e57876bb0930f4cefde78b2170 /libs
parent210e5662fbbd90c550eb086c72abc54f876d6b91 (diff)
Fix falsely assumes session was already started (#16047)
fix https://wordpress.org/support/topic/an-error-occurred-session-already-started/#topic-12961322-replies The code should actually not be needed as we added a while ago `session_status()` to correctly check if a session is already active or not. SID constant is not realiable. In this case problem was this https://3v4l.org/bpUFK Basically a session was started by some other plugin causing the SID constant to be set. The plugin also directly closed the session again so we still attempted to start the session (which is correct). But then Zend falsely assumes session is started because of the SID constant when there is actually no session. SID is not reliable for this purpose and be better to rely on `session_status()` which we added a while backa
Diffstat (limited to 'libs')
-rw-r--r--libs/Zend/Session.php7
1 files changed, 0 insertions, 7 deletions
diff --git a/libs/Zend/Session.php b/libs/Zend/Session.php
index 21451e0ffa..f097920613 100644
--- a/libs/Zend/Session.php
+++ b/libs/Zend/Session.php
@@ -478,13 +478,6 @@ class Zend_Session extends Zend_Session_Abstract
. " output started in {$filename}/{$linenum}");
}
- // See http://www.php.net/manual/en/ref.session.php for explanation
- if (!self::$_unitTestEnabled && defined('SID')) {
- /** @see Zend_Session_Exception */
- // require_once 'Zend/Session/Exception.php';
- throw new Zend_Session_Exception('session has already been started by session.auto-start or session_start()');
- }
-
/**
* Hack to throw exceptions on start instead of php errors
* @see http://framework.zend.com/issues/browse/ZF-1325