Upgrade to 3.8.2

This commit is contained in:
Bastian Allgeier
2022-11-15 13:26:12 +01:00
parent fe2baa1b7a
commit f9e812cb0c
45 changed files with 760 additions and 346 deletions

View File

@@ -157,7 +157,9 @@ class FileSessionStore extends SessionStore
// check if the file is already unlocked or doesn't exist
if (!isset($this->isLocked[$name])) {
return;
} elseif ($this->exists($expiryTime, $id) === false) {
}
if ($this->exists($expiryTime, $id) === false) {
unset($this->isLocked[$name]);
return;
}

View File

@@ -101,9 +101,7 @@ class Sessions
public function create(array $options = [])
{
// fall back to default mode
if (!isset($options['mode'])) {
$options['mode'] = $this->mode;
}
$options['mode'] ??= $this->mode;
return new Session($this, null, $options);
}
@@ -117,11 +115,7 @@ class Sessions
*/
public function get(string $token, string $mode = null)
{
if (isset($this->cache[$token])) {
return $this->cache[$token];
}
return $this->cache[$token] = new Session($this, $token, ['mode' => $mode ?? $this->mode]);
return $this->cache[$token] ??= new Session($this, $token, ['mode' => $mode ?? $this->mode]);
}
/**