Hi, i just updated to 3.1.2 and am testing and updating code to match. Was using 2.x before hand. Its also on a windows dll.
Having a issue with the flash.output() in the volt not clearing messages anymore on each load.
$di->set('flash', function(){
$flash = new \Phalcon\Flash\Session(array(
'error' => 'alert alert-danger',
'success' => 'alert alert-success',
'notice' => 'alert alert-info',
'warning' => 'alert alert-warning',
));
if (method_exists($flash, 'setAutoescape')) { $flash->setAutoescape(false); }
return $flash;
});
the above is my flash message setup, now during my tests i tried a few things, the below ill write what worked and what didnt. All test were done in my IndexController, indexAction.
WORKED:
$this->flashSession->output(true);
$this->flash->output(true);
echo "<pre>"; print_r($_SESSION);
exit();
$this->flashSession->output();
$this->flash->output();
echo "<pre>"; print_r($_SESSION);
exit();
DIDNT WORK:
$this->flash->output(true);
echo "<pre>"; print_r($_SESSION);
exit();
$this->flashSession->output(true);
echo "<pre>"; print_r($_SESSION);
exit();
$this->flash->output();
echo "<pre>"; print_r($_SESSION);
exit();
$this->flashSession->output();
echo "<pre>"; print_r($_SESSION);
exit();
Also as a side note, not related to the issue directly. How come the flashSession di is avaliable when not directly defined by me?