Serialize() in WP
-
I serialize a bunch of numbers and store them in a cookie. When unserializing the cookie data for retrieval, returned data is empty. This does not occur outside of WordPress. I checked for a WordPress function that substitutes unserialize() and there isn’t.
Here’s sample code of what I’m working with:
echo unserialize($_COOKIE[‘Default’]); // returns empty in WP
I’ve been doing this for months, and am surprised to see this not working on a WP theme page.
The topic ‘Serialize() in WP’ is closed to new replies.