long values are truncated to 6 decimal digits upon encoding
| Bug #40576 | long values are truncated to 6 decimal digits upon encoding | ||||
|---|---|---|---|---|---|
| Submitted: | 2007-02-21 11:46 UTC | Modified: | 2007-02-21 14:25 UTC | ||
| From: | giunta dot gaetano at sea-aeroportimilano dot it | Assigned: | tony2001 (profile) | ||
| Status: | Closed | Package: | XMLRPC-EPI related | ||
| PHP Version: | 5.2.1 | OS: | win2k sp4 | ||
| Private report: | No | CVE-ID: | None | ||
[2007-02-21 11:46 UTC] giunta dot gaetano at sea-aeroportimilano dot it
Description: ------------ As per the subject. Please note I am fully aware it is the fault of the underlying EPI lib, plus the xmlrpc spec does not mandate a strict number of digits as min/max. BUT - the epi lib is dead for all purposes but php. Hacking it might be advisable - 6 digits is a very, very low figure... Thanks Gaetano Reproduce code: --------------- <?php echo htmlspecialchars(xmlrpc_encode(1.123456789)); ?> Expected result: ---------------- <?xml version="1.0" encoding="utf-8"?> <params> <param> <value> <double>1.123457</double> </value> </param> </params> Actual result: -------------- <?xml version="1.0" encoding="utf-8"?> <params> <param> <value> <double>1.123456789</double> </value> </param> </params>
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-02-21 14:25 UTC] tony2001@php.net