Time objects can break session |
Hi,
I can't guarantee this is always the case but certainly happens most of the time. When I save an Entity object to the SESSION and at least one of the attributes is a Time object, the next session_start() throws an exception.
Error
Invalid serialization data for DateTime object SYSTEMPATH/Session/Session.php at line 1005 Code: 998 if (ENVIRONMENT === 'testing') Now this is puzzling. I found this fix: https://github.com/codeigniter4/CodeIgni...78b1bdc1b3 But when I look at the current code on GitHub, Time::__wakeup() is not there. I added this function to my version of the Time class and so far it seems to be working fine.
Time::__wakeup() is there.
https://github.com/codeigniter4/CodeIgni....php#L1173
|
Welcome Guest, Not a member yet? Register Sign In |