CodeIgniter
CodeIgniter copied to clipboard
CI > Session > function _serialize($data) + _unserialize($data)
Hi there,
I found a really nasty problem using the internal session-store of codeigniter...
The problem is, that if I want to store a quote ("), the session-string gets destoryed!
You could use json_encode and json_decode for the function. I was overloading your both functions by:
{{{
!php
function _unserialize($data) { return json_decode($data, true); }
function _serialize($data) { return json_encode($data); }
}}}
and everything is fine... keep on running ;-)
with best regards,
Patrick ([email protected])
I'm pretty sure this works now.