Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point to string affected by locale #195

Open
ErnestoNCarrea opened this issue Oct 17, 2018 · 1 comment
Open

Point to string affected by locale #195

ErnestoNCarrea opened this issue Oct 17, 2018 · 1 comment

Comments

@ErnestoNCarrea
Copy link

I noticed that the function toStringPoint() in AbstractGeometry.php is affected by locale configuration and can sometimes emit coordinates with comma as a decimal separator (which will fail when persisting to a MariaDB database).
I think the problem is -at least- in line 227, in "vsprintf('%s %s', $point)" where $point is an array of two float values, and vsprintf will respect locale when implicitly converting to string.

@kapiwko
Copy link

kapiwko commented Nov 14, 2018

Unfortuanelly in general that library is not usable when locale has comma as decimal point - I always got POINT(1,1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants