|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
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.

- the epi lib is dead for all purposes but php. Hacking it might be advisable
- 6 digits is a very, very low figure...


Reproduce code:
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>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-21 14:25 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jul 14 04:01:25 2020 UTC