ZF-5947: Sparse array returned with mixed indexes(AMF3)
Description
When i try return next array
array(1=> '1', 5 => '5');
as result it is returned to flash as:
array(0=> '1', 1 => '5');
Then when i want return some db data like array(id => value) - i cannot do it.
Comments
Posted by Ilya Gruzinov (shagren) on 2009-03-05T01:41:04.000+0000
Proposed solution
Posted by Ilya Gruzinov (shagren) on 2009-06-11T03:20:24.000+0000
Next code from Zend_XmlRpc_Value::_phpVarToNativeXmlRpc() can bu used:
if (!empty($value) && is_array($value) && (array_keys($value) !== range(0, count($value) - 1))) { ...
Posted by Rob Allen (rob) on 2012-11-20T20:53:07.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.