Menu

#39 WideImage_Coordinate::parse with locale

open
nobody
5
2012-07-11
2012-07-11
Arthur J
No

The static function parse() convert float into a string with the help of strval().
But in some locale the decimal separator is the character "," (comma).
Then the function return value 0.

I patch quickly the line 56 : $coordinate = strval($c);
In remplacement, i use : $coordinate = is_float($c) ? sprintf('%F', $c) : strval($c);

Thx and sorry for my poor english.

Discussion


Log in to post a comment.