session bug? |
I used session in many places.
when I set(update) part of session. the previous session data was destroied. only the updated data are available. please test it!! step one, use the follow data. PHP Code: $data = array( step two, run the follow code to update part of data. PHP Code: $newdata = array( now the session data is array('username'=>'david name') the session of email and userid are not available. is it a bug? (11-25-2016, 05:49 AM)startbbs Wrote: I used session in many places. Shouldn't you be passing 2 params with the key and its value instead of array like set('username', 'david');
Long live CodeIgniter!
please check:
https://bcit-ci.github.io/CodeIgniter4/l...ssion-data $session->set($array);is supported, (11-25-2016, 08:10 AM)startbbs Wrote: please check: Yes it is. But using an array as a single param, erases the previous values. Use the 2 param style when setting a single value.
Long live CodeIgniter!
Isn't this thread the same as this one: http://forum.codeigniter.com/thread-66651.html ?... which was also started by you...
Website: http://avenir.ro
|
Welcome Guest, Not a member yet? Register Sign In |