the module had a call to json_encode() :

    $options[] = "['options', " . json_encode($params['options'], JSON_NUMERIC_CHECK) . "]";

the 2nd parameter to json_encode() was not added until PHP 5.3 and JSON_NUMERIC_CHECK particularly was not added until PHP 5.3.3 - see http://php.net/json_encode. so on sites running older versions of PHP, not only is that type checking not happening, but there is a PHP error on the function call.

i added code to simulate the effect, setting the value to float or int as applicable.

Comments

notzach’s picture

Tested the patch out on a box running php 5.2.17 and I haven't had any issues yet.

esbenvb’s picture

Issue summary: View changes
StatusFileSize
new490 bytes

This patch should also work with PHP < 5.3.3, and performs better :)

esbenvb’s picture

Status: Active » Needs review