You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #47547 [Ldap] Do not run ldap_set_option on failed connection (tatankat)
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Ldap] Do not run ldap_set_option on failed connection
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License | MIT
ldap_set_option should only be called on null (first time setOption is run) or on an LDAP\Connection instance. When ldap_connect fails, it returns a boolean. ldap_set_option fails on this, which results in an early TypeError instead of the LdapException with the real issue: 'Could not connect to Ldap server'. So, the result of ldap_connect should be checked earlier.
Commits
-------
8f4f2b1 [Ldap] Do not run ldap_set_option on failed connection
0 commit comments