mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Stay 100% BC for 2.7
This commit is contained in:
parent
d848c5f327
commit
394da88d23
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
|
|
|
@ -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'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue