ZF-8259: Zend_Ldap->search() fails to bind if not yet bound


When using Zend_Ldap->search() without explicitly binding first, the search will fail because there is no ldap resource. To me it seems the logical way to fix this is to extend the getResource function with a bind (if not yet bound), because this can also eliminate the check in a lot of other places in the code, and it will ensure getResource() returns a resource or throws an exception.


fixed in trunk (r18918). {{Zend_Ldap::getResource()}} now always returns a connected and bound {{ext/ldap}} resource (given the fact that a connection can be made and a user can be bound with the given options)