Unserialize sometimes returns false
I have faced similar kind of issue earlier. I show u how i have solved it.
After you serialize data, apply base64_encode() e.g
$txt = base64_encode(serialize($txt));
And when you unserialize it
e.g.
$txt = unserialize(base64_decode($txt));
Try this . Hope work for u as well. Good luck