ZF-5947: Sparse array returned with mixed indexes(AMF3)


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.


Proposed solution

Next code from Zend_XmlRpc_Value::_phpVarToNativeXmlRpc() can bu used:

if (!empty($value) && is_array($value) && (array_keys($value) !== range(0, count($value) - 1))) { ...

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.