Skip to content

Commit 5c6e7df

Browse files
committed
gc
1 parent 986b73b commit 5c6e7df

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

src/Config.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
'driver' => 'file',
55

66
'file' => [
7-
'salt' => 'secret_salt_key', #
8-
'path' => '/', #
9-
'rotate' => 1800, # Rotate every 30 min(60 * 30).
10-
'domain' => null, #
11-
'http_only' => true, #
12-
'expiration' => 0, #
13-
14-
'name' => '_Bittr_SESSID', #
15-
'match_ip' => true, #
16-
'match_browser' => true, #
17-
'save_path' => 'Temp/', #
18-
'cache_limiter' => 'nocache' #
19-
7+
'salt' => 'secret_salt_key', #
8+
'path' => '/', #
9+
'rotate' => 1800, # Rotate every 30 min(60 * 30).
10+
'domain' => null, #
11+
'http_only' => true, #
12+
'expiration' => 0, #
13+
14+
'name' => '_Bittr_SESSID', #
15+
'match_ip' => true, #
16+
'match_browser' => true, #
17+
'save_path' => 'Temp/', #
18+
'cache_limiter' => 'nocache', #
19+
'gc_probability' => '1', #
2020
],
2121

2222
'cookie' => [

src/Handlers/File/FileSession.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,10 @@ private function sessionType(string $type, string $name, $value): void
242242
/**
243243
* Calls user provide error handler
244244
*
245-
* @param string $message
245+
* @param string $error
246+
* @param string $error_code
246247
*/
247-
private function newError(string $error): void
248+
private function newError(string $error, string $error_code): void
248249
{
249250
call_user_func_array($this->error_handler, [$error, $error_code]);
250251
}

src/Session.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function start(string $name = '__btr')
5858
# check if openssl is enabled since SessionHandler class uses openssl to encrypt and decrypt session content
5959
if ( ! extension_loaded('openssl'))
6060
{
61-
trigger_error("You don't have openssl enabled. So seve handler wont be encrypted.(comment out Session.php line:61 if you cant get openssl enabled and wonna get rid of this error) ", E_USER_NOTICE);
61+
trigger_error("You don't have openssl enabled. So seve handler wont be encrypted.(comment out Session.php line:61 if you cant get openssl enabled and wanna get rid of this error)", E_USER_NOTICE);
6262
}
6363
else
6464
{
@@ -75,8 +75,7 @@ public static function start(string $name = '__btr')
7575
if (is_dir($save_path))
7676
{
7777
session_save_path($save_path);
78-
# For GC in Debian
79-
ini_set('session.gc_probability', '1');
78+
ini_set('session.gc_probability', $config->gc_probability);
8079
}
8180
else
8281
{

0 commit comments

Comments
 (0)