Skip to content

Commit

Permalink
Merge pull request #3608 from cakephp/3.0-session-component-fix
Browse files Browse the repository at this point in the history
Update session component to not specify a default element.
  • Loading branch information
ADmad committed May 31, 2014
2 parents d25a0e8 + 6fbd9b8 commit fa81057
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Component/SessionComponent.php
Expand Up @@ -121,7 +121,7 @@ public function check($name) {
* @return void
* @link http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html#creating-notification-messages
*/
public function setFlash($message, $element = 'default', array $params = array(), $key = 'flash') {
public function setFlash($message, $element = null, array $params = array(), $key = 'flash') {
$this->_session->flash($message, 'info', $params + compact('element', 'key'));
}

Expand Down
Expand Up @@ -173,7 +173,7 @@ public function testSessionFlash() {
$Session->setFlash('This is a test message');
$this->assertEquals(array(
'message' => 'This is a test message',
'params' => array('element' => 'default'),
'params' => array('element' => null),
'type' => 'info'
), $Session->read('Message.flash'));
}
Expand Down

0 comments on commit fa81057

Please sign in to comment.