Last modified: 2011-02-14 00:55:39 UTC
Xml::encodeJsVar puts quotes around floats. Can be fixed by changing <pre>} elseif ( is_int( $value ) ) {</pre> into <pre>} elseif ( is_int( $value ) || is_float( $value ) ) {</pre> Any reason not to make this change?
Looks good... I also threw in a strval() on the return value just for good measure (shouldn't make a difference in usage since appending is all that gets done with these). Fixed in r82099; also added phpunit test cases for int, float, and strings that appear like int and float (which correctly do pass through as strings).