cakephp/cakephp — pull request #3848 by ifunk (2014-07-01 11:22:59+00:00)
Title: Update SessionHelper::flash attributes merge logic.

Having the SessionHelper::flash method overwrite the specified element seems backwards to me.

In my controller:

$this->Session->setFlash('Item was saved');

In my view:

$this->Session->flash('flash', array('element' => 'success'));

This works great. However, when I specify an element:

$this->Session->setFlash('Item could not be saved', 'error');

The element is still rendered out as a success message. I know I can just add success to all of my `setFlash()` calls but just thought I would express my point of view.