Ticket Details

Session adapter seems dysfunctional

BUG Ticket (closed)

It doesn't look like using Session::write() makes the variables available for immediate re-use. This seems counter-intuitive.

{{{
var_dump(
	Session::write('test', 'test1'), // false, should be true
	Session::read('test'), // null, should be test1?
	Session::write('test', 'test2'),
	Session::read('test'), // still null, should be test2?
	Session::delete('test'),
	Session::read('test')
);
}}}

http://rad-dev.org/forks/ddebernardy/lithium/commits/view/b0efcb6302ad107c76c1dc0ad2469350e5191933 fixes the first issue for the PHP adapter. I'd like to get confirmation the above isn't the expected behavior.
on 09.04.10 reported by: ddebernardy owned by: jperras

Updates

on 09.13.10 by ddebernardy
also problematic, and certainly related:

{{{
Session::write('test', 'test');
var_dump(isset($_SESSION)); // false
}}}

(That would be when using the default config supplied. The foreach/break in the read()/write() methods makes it prefer cookies.
on 09.13.10 by jperras
  • owner was changed to jperras
  • status was changed to in progress
(fixed) on 10.02.10 by jperras
  • status was changed to closed
  • resolution was changed to fixed
This was fixed a while back - see the test added in [0a9925c081b163a7fde32711520824100ebf99eb].

Thanks for the report!