php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46483 ext/soap does not convert unsigned longs with values >2147483647 to floats
Submitted: 2008-11-04 17:24 UTC Modified: 2008-11-07 16:02 UTC
From: rosiefitzpatrick at grouplogic dot com Assigned:
Status: Closed Package: SOAP related
PHP Version: 5.2.6 OS: Mac OS 10.5.5
Private report: No CVE-ID: None
 [2008-11-04 17:24 UTC] rosiefitzpatrick at grouplogic dot com
Description:
------------
On a 32-bit Leopard system (Intel Core Duo), when my SOAP server returns an unsigned long whose value is greater than 2147483647, the SoapClient interprets this value as an integer with value 2147483647.  On a 64-bit Leopard system (Intel Core 2 Duo), the SoapClient interprets the value as an integer with the correct value (whatever was in the XML from the server).
On a 32-bit Tiger (Mac OS X 10.4) system running PHP 5.2.0, it comes back from the SoapClient class as a float with the correct integer value that was sent from the server. 


Expected result:
----------------
According to the PHP docs (and the behavior of ext/soap in 5.2.0), an integer with greater than maximum value is converted to a float.

Actual result:
--------------
Instead of converting the unsigned long to a float and retaining the value, it remains an integer with PHP_INT_MAX value.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-04 22:27 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2008-11-05 18:28 UTC] rosiefitzpatrick at grouplogic dot com
The snapshot does not contain this bug.  On 32-bit Leopard it converts to a float with the correct value just as it does on Tiger.  Thank you!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 23:01:29 2024 UTC