Some locales, such as el-GR, use a comma as the decimal separator. This means that $x = 1.23; echo (string) $x;
will yield 1,23 (with a comma!) instead of 1.23 (with a dot!). This affects the way the SQL WHERE clauses are
generated. All database servers expect a dot as the decimal separator. If they see a decimal with a comma as the
separator they throw a SQL error.
This method will try to replace commas with dots. I tried working around this with locale switching and the %F
(capital F) format option in sprintf to no avail. I'm pretty sure I was doing something wrong, but I ran out of
time trying to find an academically correct solution. The current implementation of sanitiseValue is a silly
hack around the problem. If you have a proper –and better performing– solution please send in a PR and I'll put
it to the test.