mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Update Composer dependencies.
This commit is contained in:
parent
1a439466d5
commit
9bba3f4066
440 changed files with 17739 additions and 8623 deletions
|
@ -145,6 +145,12 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line));
|
||||
}
|
||||
|
||||
$sessionId = $_COOKIE[session_name()] ?? null;
|
||||
if ($sessionId && !preg_match('/^[a-zA-Z0-9,-]{22,}$/', $sessionId)) {
|
||||
// the session ID in the header is invalid, create a new one
|
||||
session_id(session_create_id());
|
||||
}
|
||||
|
||||
// ok to try and start the session
|
||||
if (!session_start()) {
|
||||
throw new \RuntimeException('Failed to start the session.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue