Skip to content
Permalink
Browse files

Preventing multiple iterations

  • Loading branch information...
karmicdice committed Aug 23, 2014
1 parent f6f794e commit f03393a2a39e62ebc1aca888f5a4eb13d70ee82c
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/View/Helper/SessionHelper.php
@@ -120,6 +120,7 @@ public function flash($key = 'flash', $attrs = array()) {
if (CakeSession::check('Message.' . $key)) {
$flash = CakeSession::read('Message.' . $key);
CakeSession::delete('Message.' . $key);
$message = $flash['message'];
unset($flash['message']);
@@ -144,7 +145,6 @@ public function flash($key = 'flash', $attrs = array()) {
$tmpVars['message'] = $message;
$out = $this->_View->element($flash['element'], $tmpVars, $options);
}
CakeSession::delete('Message.' . $key);
}
return $out;
}

0 comments on commit f03393a

Please sign in to comment.
You can’t perform that action at this time.