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

Issue Type: Bug Created: 2009-03-05T01:39:32.000+0000 Last Updated: 2012-11-20T20:53:07.000+0000 Status: Closed Fix version(s): Reporter: Ilya Gruzinov (shagren) Assignee: None Tags: - Zend_Amf

Related issues: Attachments: - proposed.patch


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.


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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.