Stay 100% BC for 2.7

This commit is contained in:
euromark 2015-01-04 10:52:18 +01:00
parent d848c5f327
commit 394da88d23
2 changed files with 3 additions and 3 deletions

View file

@ -472,10 +472,10 @@ class CakeSession {
* *
* Optionally also clears the session id and renews the session. * Optionally also clears the session id and renews the session.
* *
* @param bool $renew If the session should also be renewed. Defaults to false. * @param bool $renew If the session should also be renewed. Defaults to true.
* @return void * @return void
*/ */
public static function clear($renew = false) { public static function clear($renew = true) {
$_SESSION = null; $_SESSION = null;
if ($renew) { if ($renew) {
self::$id = null; self::$id = null;

View file

@ -410,7 +410,7 @@ class CakeSessionTest extends CakeTestCase {
*/ */
public function testClear() { public function testClear() {
$this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out')); $this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out'));
TestCakeSession::clear(); TestCakeSession::clear(false);
$this->assertFalse(TestCakeSession::check('Delete.me')); $this->assertFalse(TestCakeSession::check('Delete.me'));
$this->assertFalse(TestCakeSession::check('Delete')); $this->assertFalse(TestCakeSession::check('Delete'));
} }