Thanks to visit codestin.com
Credit goes to github.com

Skip to content

i wish to ignore LDAP server disconnected error 500 #28426

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
yedprior opened this issue Sep 10, 2018 · 4 comments
Closed

i wish to ignore LDAP server disconnected error 500 #28426

yedprior opened this issue Sep 10, 2018 · 4 comments

Comments

@yedprior
Copy link

yedprior commented Sep 10, 2018

Hello ,
can we have an @ for ldap_start_tls in file vendor/symfony/ldap/Adapter/ExtLdap/Connection.php line 140 pls?

if ('tls' === $this->config['encryption'] && false === ldap_start_tls($this->connection)) {
throw new LdapException(sprintf('Could not initiate TLS connection: %s.', ldap_error($this->connection)));
}

@xabbuh xabbuh added the Ldap label Sep 10, 2018
@chalasr
Copy link
Member

chalasr commented Sep 10, 2018

Are you getting a warning?

@linaori
Copy link
Contributor

linaori commented Sep 13, 2018

The php function is undocumented, but it seems to be able to throw warnings according to the source:

https://github.com/php/php-src/blob/8ca1f47a7a25f61fcc63313a771e6922e3258046/ext/ldap/ldap.c#L3687

@chalasr
Copy link
Member

chalasr commented Sep 13, 2018

Looks sensible to me then, that would be consistent with similar calls.
PR welcomed, for 2.8 I guess.

@yedprior
Copy link
Author

yedprior commented Sep 13, 2018 via email

nicolas-grekas added a commit that referenced this issue Sep 18, 2018
…tart_tls (Andras Debreczeni)

This PR was merged into the 2.8 branch.

Discussion
----------

[Ldap] Use shut up operator on connection errors at ldap_start_tls

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28426
| License       | MIT
| Doc PR        | n/a

Added shut-up operator to php function `ldap_start_tls()` so connection errors are ignored.

Commits
-------

af54189 [Ldap] Use shut up operator on connection errors at ldap_start_tls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants