diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index 4f1ff8d5e..fa89d0410 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -472,10 +472,10 @@ class CakeSession { * * 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 */ - public static function clear($renew = false) { + public static function clear($renew = true) { $_SESSION = null; if ($renew) { self::$id = null; diff --git a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php index 361822aa2..2b7cac579 100644 --- a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php @@ -410,7 +410,7 @@ class CakeSessionTest extends CakeTestCase { */ public function testClear() { $this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out')); - TestCakeSession::clear(); + TestCakeSession::clear(false); $this->assertFalse(TestCakeSession::check('Delete.me')); $this->assertFalse(TestCakeSession::check('Delete')); }