Issue Type: Bug Created: 2009-01-20T18:00:40.000+0000 Last Updated: 2009-04-18T13:08:08.000+0000 Status: Resolved Fix version(s): - 1.7.8 (30/Mar/09)
Reporter: caspar harmer (rapsac) Assignee: Wade Arnold (wadearnold) Tags: - Zend_Amf
Related issues: Attachments:
In attempting to switch from AMFPHP to Zend_Amf, I ran across the following issue:
The AMF3 encoding doesn't seem to be correct for ByteArray instances. When returning a Zend_Amf_Value_ByteArray instance, the serializer attempts to pass the instance to its writeString method, which attempts to treat it as a simple string, causing php to send the incorrect data as well as emit a notice as follows:
bq. Notice: Object of class Zend_Amf_Value_ByteArray to string conversion
One way to avoid this and properly return the binary data to the server is to modify line 81 of Zend\Amf\Parse\Amf3\Serializer.php to read:
bq. $this->writeString($data instanceof Zend_Amf_Value_ByteArray ? $data->getData() : $data);
Posted by caspar harmer (rapsac) on 2009-01-20T18:02:16.000+0000
This issue is not fixed in the minimal framework version 1.7.3 that I am using. The fix noted above (from the earlier issue) seems to work well though.
Posted by Wade Arnold (wadearnold) on 2009-04-18T13:08:07.000+0000
I am not sure what version this was resolved in but I know that it is in the ZF 1.7.8 release. Thanks!
Have you found an issue?
See the Overview section for more details.