mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Merge pull request #4353 from karmicdice/patch-1
Prevent infinite loops by rendering a flash element inside a flash element. Fixes: #4350
This commit is contained in:
commit
72f62b739e
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…
Add table
Reference in a new issue