8000 [LDAP] Add error code in exceptions generated by ldap by vgpastor · Pull Request #35913 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[LDAP] Add error code in exceptions generated by ldap #35913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

vgpastor
Copy link
Contributor
@vgpastor vgpastor commented Mar 1, 2020
Q A
Branch? master
Bug fix? no
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

This PR add the exception code returned by ldap PHP component to LdapException, and allow users a better way to detect the errors. Before this LdapException allways return code 0, and make neccesary evaluate the string returned to detect the error.

@vgpastor
Copy link
Contributor Author
vgpastor commented Mar 1, 2020

Sotty about fix style commits, my ide hack me continuosly

@nicolas-grekas nicolas-grekas added this to the next milestone Mar 2, 2020
@OskarStark
Copy link
Contributor

Closes #33339

Thanks

@fabpot
Copy link
Member
fabpot commented Mar 2, 2020

Thank you @vgpastor.

@fabpot fabpot closed this Mar 2, 2020
fabpot added a commit that referenced this pull request Mar 2, 2020
…(Victor Garcia)

This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[LDAP] Add error code in exceptions generated by ldap

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  |no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

This PR add the exception code returned by ldap PHP component to LdapException, and allow users a better way to detect the errors. Before this LdapException allways return code 0, and make neccesary evaluate the string returned to detect the error.

Commits
-------

b4c90f0 [LDAP] Add error code in exceptions generated by ldap
@dontub
Copy link
dontub commented Mar 18, 2020

For the record: Commit db46f3b doesn't fix some issues addressed in #33339.

  • LdapException is used for errors on non LDAP operations.
  • ConnectionException doesn't extend LdapException
  • Silencing is missing on some ldap functions.
  • If ldap_unbind() or ldap_control_paged_result_response() fails, no exception is thrown.
  • Unnecessary if block
    if (false === $this->connection) {
    (ldap_connect() never returns false.)

@nicolas-grekas nicolas-grekas modified the milestones: next, 5.1 May 4, 2020
@fabpot fabpot mentioned this pull request May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0