Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.10.2
-
Fix Version/s: None
-
Component/s: Zend_Amf
-
Labels:None
Description
I upgraded to PHP 5.3.2 and Zend Framework 1.10.2 at the same time. Afterwards, a simple AMF call that used to work no longer does. When passing several untyped arrays ("Object" types from Flex) to the PHP function, the result is the following exception, which makes no sense to me:
<b>Fatal error</b>: Uncaught exception 'Zend_Amf_Exception' with message 'Unknows Definition reference: 0' in C:\svn\zend\ZendFramework-1.10.2-minimal\library\Zend\Amf\Parse\Amf3\Deserializer.php:304
Stack trace:
#0 C:\svn\zend\ZendFramework-1.10.2-minimal\library\Zend\Amf\Parse\Amf3\Deserializer.php(106): Zend_Amf_Parse_Amf3_Deserializer->readObject()
#1 C:\svn\zend\ZendFramework-1.10.2-minimal\library\Zend\Amf\Parse\Amf0\Deserializer.php(293): Zend_Amf_Parse_Amf3_Deserializer->readTypeMarker()
#2 C:\svn\zend\ZendFramework-1.10.2-minimal\library\Zend\Amf\Parse\Amf0\Deserializer.php(130): Zend_Amf_Parse_Amf0_Deserializer->readAmf3TypeMarker()
#3 C:\svn\zend\ZendFramework-1.10.2-minimal\library\Zend\Amf\Parse\Amf0\Deserializer.php(217): Zend_Amf_Parse_Amf0_Deserializer->readTypeMarker()
#4 C:\svn\zend\ZendFramework-1.10.2-minimal\library\Zend\Amf\Parse\Amf0\Deserializer.php(106): Zend_Amf_Parse_Amf0_Deserializer->readArray()
#5 C:\svn\zend\ZendFramework-1.10.2-minimal\library\Zend\Amf\Request.php(173): Zend_Amf_Parse_Amf0_Deseria in <b>C:\svn\zend\ZendFramework-1.10.2-minimal\library\Zend\Amf\Request.php</b> on line <b>176</b><br />
I will attach a skeleton PHP sample that exhibits the behavior. The calling code is a Flex function that looks like so:
public function login(username:String, password:String):void
{ var session:Object = new Object(); session['code'] = _sessionID; var loginInfo:Object = new Object(); loginInfo['username'] = username; loginInfo['password'] = SHA1.encrypt(_authSalt+password); var everything:Object = new Object(); everything['session_info'] = session; everything['login_method'] = "password"; everything['login_blob'] = loginInfo; var responder:Responder = new Responder(onLogin, onNetworkingError); _conn.call("XCRpcProtocol_AMF.login", responder, session, "password", loginInfo); }In this example case it is called with both parameters set to "". I will attach the binary input (saved from Charles proxy) in case you have a method of importing it directly, to simplify repro. Thanks!
test.php is a very simple example that does nothing much. (I am sure you will need to change the include path, I was making sure that the correct Zend library was getting used.)
input.bin is the binary data that is generated by the Flex client application, which causes the error.