Skip to content

Commit

Permalink
Fixing notice error that could occur if csrfTokens ended up being nul…
Browse files Browse the repository at this point in the history
…l/not an array.
  • Loading branch information
markstory committed Feb 12, 2011
1 parent 47cdaed commit e042093
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/controller/components/security.php
Expand Up @@ -689,7 +689,7 @@ protected function _generateToken($controller) {
$tokenData = array();
if ($this->Session->check('_Token')) {
$tokenData = $this->Session->read('_Token');
if (!empty($tokenData['csrfTokens'])) {
if (!empty($tokenData['csrfTokens']) && is_array($tokenData['csrfTokens'])) {
$token['csrfTokens'] = $this->_expireTokens($tokenData['csrfTokens']);
}
}
Expand Down

0 comments on commit e042093

Please sign in to comment.