I don’t know whether it’s a bug or what.
I would store a object in session sometimes, like this.
$this->session->set_userdata('session_name', $object);
before 1.7, it worked just fine. But when I trying to upgrade my application to CI 1.7, it came wrong.
It will cause error messages like this:
A PHP Error was encountered
Severity: 4096
Message: Object of class stdClass could not be converted to string
Filename: libraries/Session.php
Line Number: 715
When I digged into 1.7 Session library, I found the problem.
Fixed a bug in the Session class that was disallowing slashes in the serialized array.
There are some new functions in Session library.
GOTO line 683 and line 714,
$data[$key] = str_replace('{{slash}}', '\\', $val);
When $val is a object, it came wrong, just replace this line with
if(!is_object($val)) $data[$key] = str_replace('{{slash}}', '\\', $val);
For those who got the same problem, this is my solution.
Hope there will be a hotfix soon.
