php
PHP and json_decode() madness: json_decode() incorrectly handling large ints
This had me up the walls for a while. For the new Adapting to Scarcity website, I wrote some custom scripts to generate an RSS feed of our Flickr photos and photosets to facilitate automagically populating the website with our latest from Flickr. I've been passing some information in a JSON string, but was getting incorrect results after processing it. Turns out some versions of PHP 5 have a weird issue with the json_decode string improperly handling largest integers. Solution? Stop using integers and turn them into strings.



