mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Making CakeSession destory() make started() not return true. Fixing tests that tried to modify session config while a session was active.
This commit is contained in:
parent
daab018777
commit
f47ee0d29a
2 changed files with 3 additions and 1 deletions
|
@ -445,7 +445,7 @@ class CakeSession {
|
|||
* @return void
|
||||
*/
|
||||
public function destroy() {
|
||||
$_SESSION = array();
|
||||
$_SESSION = null;
|
||||
self::$id = null;
|
||||
self::init(self::$path);
|
||||
self::start();
|
||||
|
|
|
@ -366,6 +366,7 @@ class CakeSessionTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
function testReadAndWriteWithCakeStorage() {
|
||||
session_write_close();
|
||||
ini_set('session.save_handler', 'files');
|
||||
Configure::write('Session.save', 'cake');
|
||||
$this->setUp();
|
||||
|
@ -401,6 +402,7 @@ class CakeSessionTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
function testReadAndWriteWithCacheStorage() {
|
||||
session_write_close();
|
||||
ini_set('session.save_handler', 'files');
|
||||
Configure::write('Session.save', 'cache');
|
||||
$this->setUp();
|
||||
|
|
Loading…
Reference in a new issue