From 545694d84b2fd9c63d4961386e9691df6251834f Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 6 Dec 2011 12:35:18 -0500 Subject: [PATCH] Fix undefined variable error. --- lib/Cake/Controller/Component/SecurityComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Controller/Component/SecurityComponent.php b/lib/Cake/Controller/Component/SecurityComponent.php index 6d6f91b06..7d4be3332 100644 --- a/lib/Cake/Controller/Component/SecurityComponent.php +++ b/lib/Cake/Controller/Component/SecurityComponent.php @@ -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);