Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix undefined variable error.

  • Loading branch information...
commit 545694d84b2fd9c63d4961386e9691df6251834f 1 parent fc4846d
@markstory markstory authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Cake/Controller/Component/SecurityComponent.php
View
2  lib/Cake/Controller/Component/SecurityComponent.php
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.