Anonymous | Login | Signup for a new account | 12-17-2024 14:31 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002539 | [Quercus] | minor | always | 03-19-08 21:27 | 03-21-08 13:19 | ||||
Reporter | ckchris | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 3.1.6 | Product Version | |||||
Product Build | |||||||||
Summary | 0002539: a zero value Double or Float Value type should return "0" when converted to String | ||||||||
Description |
I ran into a problem with an unexpected behavior when running phpBB3. There is a code inside phpBB3's includes/db/mysqli.php that does a float-based division. A floor() is then applied to it. The return value of a floor() is a float value, which is expected and is the proper behavior that Quercus exhibits. However, the problem is that the floor'ed value is appended to a SQL query string for the "limit x, y" part of the query. Unfortunately, the toString() for the float value of 0 returned "0.0" when run under quercus. This turned the limit string into "limit 0.0, 10", which mysql driver throws an exception. I recommend that the Double and Float and Decimal value types should check for 0, and if so, return "0" for the string instead of "0.0" to retain compatible behavior with PHP. |
||||||||
Steps To Reproduce | |||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
35 total queries executed. 28 unique queries executed. |