php.net |  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
Status: Closed Package: XMLRPC-EPI related
PHP Version: 5.2.1 OS: win2k sp4
Private report: No CVE-ID:
 [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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-21 14:25 UTC] tony2001@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 13:02:46 2014 UTC