mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 08:41:39 +09:00
Prevent infinite addition of sequence numbers to $_SESSION
This commit is contained in:
parent
3ba27ef156
commit
bcf81bce4d
1 changed files with 4 additions and 0 deletions
|
|
@ -244,6 +244,10 @@ function setUserSequence($seq): void
|
|||
}
|
||||
$seq = intval($seq);
|
||||
$_SESSION['seq'][$seq] = $seq;
|
||||
if (count($_SESSION['seq']) > 1000)
|
||||
{
|
||||
$_SESSION['seq'] = array_slice($_SESSION['seq'], 600, null, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue