You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
It's neccesary clarify that flash messages aren't removed automatically when next session comes. They are removed because the use of get method in FlashBag object. If you use peek() method, or simply don't show stored messages they remain in session.
Show get() method in Symfony\Component\HttpFoundation\Session\Flash\FlashBag:
/**
* {@inheritdoc}
*/
public function get($type, array $default = array())
{
if (!$this->has($type)) {
return $default;
}
$return = $this->flashes[$type];
unset($this->flashes[$type]);
return $return;
}
0 commit comments