Preventing multiple iterations

This commit is contained in:
Karma Dice 2014-08-23 15:47:12 +05:30
parent f6f794eb98
commit f03393a2a3

View file

@ -120,6 +120,7 @@ class SessionHelper extends AppHelper {
if (CakeSession::check('Message.' . $key)) {
$flash = CakeSession::read('Message.' . $key);
CakeSession::delete('Message.' . $key);
$message = $flash['message'];
unset($flash['message']);
@ -144,7 +145,6 @@ class SessionHelper extends AppHelper {
$tmpVars['message'] = $message;
$out = $this->_View->element($flash['element'], $tmpVars, $options);
}
CakeSession::delete('Message.' . $key);
}
return $out;
}