diff options
author | Nina Pypchenko <22447785+nina-py@users.noreply.github.com> | 2020-09-29 10:35:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 10:35:54 +0300 |
commit | 214f0d1da9ff28d9bd2eb0fd4b0e31871b762324 (patch) | |
tree | 865c9e9bd00a92c80e0ca58fb8a6a024bcf2964c /core | |
parent | 5deb3f6919e5aafccd5422f132109289d46ba066 (diff) |
Fixes #15274. The value for session.gc_probability now comes from the config files (#16480)
Diffstat (limited to 'core')
-rw-r--r-- | core/Session.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/Session.php b/core/Session.php index 3a20c10c72..4c09c3b6cb 100644 --- a/core/Session.php +++ b/core/Session.php @@ -43,7 +43,7 @@ class Session extends Zend_Session return; } self::$sessionStarted = true; - + if (defined('PIWIK_SESSION_NAME')) { self::$sessionName = PIWIK_SESSION_NAME; } @@ -114,10 +114,8 @@ class Session extends Zend_Session } } - // garbage collection may disabled by default (e.g., Debian) - if (ini_get('session.gc_probability') == 0) { - @ini_set('session.gc_probability', 1); - } + // set garbage collection according to user preferences (on by default) + @ini_set('session.gc_probability', Config::getInstance()->General['session_gc_probability']); try { parent::start(); @@ -133,7 +131,7 @@ class Session extends Zend_Session } else { $pathToSessions = Filechecks::getErrorMessageMissingPermissions(self::getSessionsDirectory()); } - + $message = sprintf("Error: %s %s\n<pre>Debug: the original error was \n%s</pre>", Piwik::translate('General_ExceptionUnableToStartSession'), $pathToSessions, |