Skip to content

Commit 6bd12aa

Browse files
committed
- removes the static variable, not needed in real life
1 parent eab4f38 commit 6bd12aa

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

SessionConfiguration.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(ConfigurationFactory $settings)
2929
'use_trans_sid' => '0', // disable to prevent session fixation and hijacking
3030
'use_only_cookies' => '1', // disable session identifiers in the URLs
3131
'cache_limiter' => '', // disable response headers
32-
'referer_check' => '', // disable for it has a dangerous implementation with substr() check
32+
'referer_check' => '', // disable it, not a safe implementation (with substr() check)
3333
]);
3434

3535
if ($this->get('expire_at_browser_close')) {
@@ -54,13 +54,7 @@ public function handler(): string
5454
*/
5555
public function sessionParameters(): array
5656
{
57-
static $ini;
58-
59-
if ($ini) {
60-
return $ini;
61-
}
62-
63-
return $ini = (new Immutable($this->filter(ini_get_all('session', false), 'session.', false)))
57+
return (new Immutable($this->filter(ini_get_all('session', false), 'session.', false)))
6458
->extract([
6559
'cache_expire',
6660
'cache_limiter',

0 commit comments

Comments
 (0)