Anonymous | Login | Signup for a new account | 12-17-2024 10:30 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ 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 | ||||||
Status | closed | Product Version | |||||||
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. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
35 total queries executed. 28 unique queries executed. |