Skip to content
Permalink
Browse files

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.
  • Loading branch information...
phpnut committed Dec 28, 2015
1 parent c2449c9 commit 027e32ce00bd2d297a77f970b25f815f5801988f
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php
@@ -115,7 +115,7 @@ public static function teardownAfterClass() {
*/
public function setUp() {
parent::setUp();
$_SESSION = array();
$_SESSION = null;
$this->ComponentCollection = new ComponentCollection();
}
@@ -202,7 +202,8 @@ public function testSessionReadWrite() {
$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');

0 comments on commit 027e32c

Please sign in to comment.
You can’t perform that action at this time.