ZF-8005: Actionscript function arguments not passed as correct type to Zend_Amf
The Zend_Amf specification states that a Number type returned from flash will map to a float in PHP. That's fine but why does the number 16 get parsed as 6.1026988574311E_320 ? I actually want to pass an integer but even if I do an explicit cast in Actionscript to type:int, Charles Proxy still reports that the value being passed is of type:Number so Zend/Amf sees it as a float. The number 16 is actually a parameter in a netconnection call from Actionscript so I don't believe it relates to object mapping between Actionscript and Zend_AMF.
As a workaround, I can pass the parameter as a string and this works but I think I should be able to pass it as a true integer.
connection.call("myservice.doSomething()", responder, id); //id is the value in question
I have tried setting the id to int elsewhere in the code and also passing int(16) but the value always arrives as a float in PHP and cannot be cast to an integer (PHP rounds it to zero).
Does anyone know why this is happening? Is it possible there is a bug in Zend_Amf causing it?