joomla/joomla-cms — pull request #5318 by Hackwar (2014-12-04 10:40:34+00:00)
Title: Fixing finder to format weight as non-locale float

See #5269

This fixes an SQL error in finder, where the weight is formatted as a locale aware float. When converting a float to a string in PHP, it unfortunately is formatted according to the locale setting. For Germany that means, that a 0.6 float becomes a "0,6" string. That breaks MySQL and is also not parsed by MySQL even when quoted. Using number_format(), we can get around that. However we are truncating the number to 2 digits after the decimal point.

Since I only fixed the code, I don't know how to test this. :wink: maybe @marneu can give testing instructions?

Since this problem is also present in the other database drivers, I will apply this patch there, too.