mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Preventing multiple iterations
This commit is contained in:
parent
f6f794eb98
commit
f03393a2a3
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue