ZF-8262: Zend_Ldap_Collection fails to check constraints, fails to return first result with current without seeking
Zend_Ldap_Collection has a protected var _currentNumber that defaults to -1. Calling current() on a fresh Zend_Ldap_Collection returned by a search will result in Zend_Ldap_Collection searching for index -1 in an array that should be indexed with positive numbers. This then falls through to Zend_Ldap_Collection_Default where a similar error is made, all in all resulting in the inability to call current() without seeking first. There is a function getFirst(), however I would expect current() to return either NULL if no result exists (as in Zend_Db_Table_Rowset_Abstract) or the first result if I do not seek.