Closed
Description
Using the getMessages() without the $remove parameter or with it set to true removes all flash messages, regardless of the $type parameter passed with it. To me it looks like a return of Issue 1575, more or less.
Here's some example code:
use Phalcon\Mvc\Controller;
class TestController extends Controller
{
public function testAction()
{
$this->flash->error('test1');
$this->flash->success('test2');
var_dump($this->flash->getMessages('error', false));
var_dump($this->flash->getMessages('success'));
var_dump($this->flash->getMessages('error'));
die;
}
}
This returns:
array(1) { [0]=> string(5) "test1" }
array(1) { [0]=> string(5) "test2" }
array(0) { }
instead of the expected:
array(1) { [0]=> string(5) "test1" }
array(1) { [0]=> string(5) "test2" }
array(1) { [0]=> string(5) "test1" }
Metadata
Metadata
Assignees
Labels
No labels