From 027e32ce00bd2d297a77f970b25f815f5801988f Mon Sep 17 00:00:00 2001 From: "Larry E. Masters" Date: Mon, 28 Dec 2015 17:19:31 -0500 Subject: [PATCH] Reverted change setting $_SESSION to an array. Commenting out a test that is invalid. This test creates a numeric key of 0 in $_SESSION which is not a valid session key. This causes error - session_write_close(): Skipping numeric key 0 error. --- .../Test/Case/Controller/Component/SessionComponentTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php b/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php index b885dfcfe..5ece8f39b 100644 --- a/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php @@ -115,7 +115,7 @@ class SessionComponentTest extends CakeTestCase { */ public function setUp() { parent::setUp(); - $_SESSION = array(); + $_SESSION = null; $this->ComponentCollection = new ComponentCollection(); } @@ -202,7 +202,8 @@ class SessionComponentTest extends CakeTestCase { $this->assertEquals($Session->read('Test'), $array); $Session->delete('Test'); - $this->assertTrue($Session->write(array('Test'), 'some value')); + //This test creates a numeric key 0 which is not a valid session key + //$this->assertTrue($Session->write(array('Test'), 'some value')); $this->assertTrue($Session->write(array('Test' => 'some value'))); $this->assertEquals('some value', $Session->read('Test')); $Session->delete('Test');