User tests: Successful: Unsuccessful:
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. maybe @marneu can give testing instructions?
Since this problem is also present in the other database drivers, I will apply this patch there, too.
Labels |
Added:
?
|
Rel_Number | ⇒ | 5269 | |
Relation Type | ⇒ | Related to |
Test done on 3.3.6: works fine, seems save, result as expected in mysql - Thanks!
@waader: On a recent debian apache2 installation using php5-fpm within de_DE.utf8 enviroment and mysql charset is an (old) latin1.
btw: The error occured after switching to php5-fpm from only using fastcgi before.
I am unable to test this currently as I am always testing against the current staging branch and com_finder seems to be broken (see screenshoot). Steps to reproduce:
@marneu I don´t need help here, that´s not the point. I am just saying that I am always testing from latest staging as in my mind there is not much value in testing a patch with an old version. On the other side: there are a lot of patches marked as ready to commit and from browsing over them it could be that after merging them the problem that I am facing right now disappears.
So I will wait for that merge to happen and then revisit this pull request.
Category | ⇒ | Search |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-06 11:31:40 |
Closed_By | ⇒ | Hackwar |
done