Skip to content

Commit

Permalink
Fix undefined variable error.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 6, 2011
1 parent fc4846d commit 545694d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/SecurityComponent.php
Expand Up @@ -553,12 +553,12 @@ protected function _validateCsrf($controller) {
* @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);
Expand Down

0 comments on commit 545694d

Please sign in to comment.