ZF-11946: Zend_Ldap_Collection::toArray throws exception instead of returning array

Issue Type: Bug Created: 2011-12-17T10:06:35.000+0000 Last Updated: 2012-01-21T15:24:32.000+0000 Status: Resolved Fix version(s): - 1.11.12 (22/Jun/12)

  • 1.12.0 (27/Aug/12)
  • Next Major Release ()

Reporter: Igor Orekhov (igvalor) Assignee: Stefan Gehrig (sgehrig) Tags: - Zend_Ldap

Related issues: Attachments:


When I try to perform Zend_Ldap::search(...)->toArray(), an exception is thrown:

Message: 0x54 (Decoding error): getting next entry (0x54 (Decoding error))

The actual problem is in Zend_Ldap_Collection_Iterator_Default::next(), which internally calls PHP's ldap_next_entry(). Upon reaching the end of the found entries, which is indicated by returning FALSE by ldap_next_entry(), Zend_Ldap_Collection_Iterator_Default::next() throws the exception instead of returning.


Posted by Stefan Gehrig (sgehrig) on 2012-01-21T15:24:32.000+0000

Could not really reproduce this issue but added a second safe-guard against an exception on an empty search result

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.