ushahidi/Ushahidi_Web — pull request #1233 by ditorelo (2013-09-08 08:44:11+00:00)
Title: Normalising data for calculate_center() (Issue #1232)

The sharing plugin passes arrays to the Json_controller::calculate_center() function, while it can come in as stdClass from a few other venues. This normalises it all to an array so the looks likes it.

This is somewhat a lazy solution, but transforming an array to an stdClass is not as straight forward. Also, this avoids re-writing other bits of code that call calculate_center(), which can introduce other bugs.

BTW, I'm **VERY** surprised this didn't come up during testing. It is fairly major.