mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fix undefined variable error.
This commit is contained in:
parent
fc4846d676
commit
545694d84b
1 changed files with 1 additions and 1 deletions
|
@ -553,12 +553,12 @@ class SecurityComponent extends Component {
|
|||
* @return array An array of nonce => expires.
|
||||
*/
|
||||
protected function _expireTokens($tokens) {
|
||||
$now = time();
|
||||
foreach ($tokens as $nonce => $expires) {
|
||||
if ($expires < $now) {
|
||||
unset($tokens[$nonce]);
|
||||
}
|
||||
}
|
||||
$now = time();
|
||||
$overflow = count($tokens) - $this->csrfLimit;
|
||||
if ($overflow > 0) {
|
||||
$tokens = array_slice($tokens, $overflow + 1, null, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue