Skip to content

Commit

Permalink
Merge pull request #72 from joanhey/fix-session
Browse files Browse the repository at this point in the history
Fix session
  • Loading branch information
joanhey authored Feb 25, 2024
2 parents 548591b + 7e238d6 commit dafe135
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ public static function sessionStart(): bool
}
static::$sessionStarted = true;
// Check session file path
if (isset($_COOKIE[HttpCache::$sessionName]) && !\preg_match('/^[a-zA-Z0-9]+$/', $_COOKIE[HttpCache::$sessionName])) {
unset($_COOKIE[HttpCache::$sessionName]);
if (isset($_COOKIE[static::$sessionName]) && !\preg_match('/^[a-zA-Z0-9]+$/', $_COOKIE[static::$sessionName])) {
unset($_COOKIE[static::$sessionName]);
}
// Generate a SID.
if (! isset($_COOKIE[static::$sessionName]) || ! \is_file(static::$sessionSavePath.'/ses_'.$_COOKIE[static::$sessionName])) {
Expand Down

0 comments on commit dafe135

Please sign in to comment.