Hi,
I did a brief test to the Phalcon\Flash\Session today, and I found the result is quite different than what it used to be (comparing Phalcon 2 to Phalcon 1.3X). The PHP codes directly below is showing the result of Phalcon 2
<?php
$this->flashSession->success("set a 'success' type flash message");
$this->flashSession->getMessages("error", TRUE); // with a "TRUE" as the second argument, all types of flash message are being removed.
$this->flashSession->getMessages("error"); // without the second argument, the result is the same as with a "TRUE" as the second argument.
$this->flashSession->getMessages("error", FALSE); // with a "FALSE as the second argument, all types of flash message are NOT being removed, and the "type" from the first argument is NOT being removed too.
I remember before upgrading to Phalcon 2, the result is:
<?php
$this->flashSession->success("set a 'success' type flash message");
$this->flashSession->getMessages("error", TRUE); // will only remove "error" type, will not remove "success" type.
$this->flashSession->getMessages("success", TRUE); // will remove "success" type ONLY
Does any of you know how to solve this? Is this an actual bug? Should I try to open a issue in GitHub?