Issues

ZF-4874: Unable to properly encode an ArrayIterator using Zend_Json_Encoder

Issue Type: Bug Created: 2008-11-08T03:33:17.000+0000 Last Updated: 2008-11-12T00:55:22.000+0000 Status: Resolved Fix version(s): Reporter: Jurrien Stutterheim (norm2782) Assignee: Jurrien Stutterheim (norm2782) Tags: - Zend_Json

Related issues: Attachments:

Description

<pre class="highlight">
$ar = new ArrayIterator();
$ar->append('foo');

echo Zend_Json_Encoder::encode($ar);

// Results in {"__className":"ArrayIterator"}

This should be:

<pre class="highlight">
{"0":"foo"}

json_encode() gives the expected result

Comments

Posted by Jurrien Stutterheim (norm2782) on 2008-11-12T00:55:20.000+0000

Resolved in revision 12580

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts