ID:               40020
 Updated by:       [EMAIL PROTECTED]
 Reported By:      pav at oook dot cz
-Status:           Open
+Status:           Bogus
 Bug Type:         SOAP related
 Operating System: FreeBSD
 PHP Version:      5.2.0
 New Comment:

This is how PHP works for ages:
# php -r 'echo 0022300455;'
4817197


Previous Comments:
------------------------------------------------------------------------

[2007-01-04 13:20:28] pav at oook dot cz

Description:
------------
I'm not totally convinced this is a valid SOAP, but anyway. I'm getting
this from a SOAP::Lite server:

<inventory_number xsi:type="xsd:int">0022300455</inventory_number>

The value in PHP comes up as 4817197. The problem is that
to_zval_long() calls strtol() with base 'zero', and libc function
strtol() understands 0x* as hex (base 16) and 00* as octal (base 8)
number, if base is unspecified (zero).

The fix here would be to change strtol() call to use base 10. Unless
octal and hex representation of int is allowed in this datatype by
specs.

I might also go to see why SOAP::Lite is tagging this as xsd:int
instead of xsd:string.

What do you think about this, dmitry?



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40020&edit=1

Reply via email to