Skip to content
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

[Mailer] Fix error message when connecting to a stream raises an error before connect() #32211

Merged
merged 1 commit into from Jun 27, 2019

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Jun 27, 2019

Q A
Branch? 4.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets see swiftmailer/swiftmailer#1201
License MIT
Doc PR n/a

According to the PHP docs, "If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call.".

Using the @ operator means that we get a generic error message without any clues about why connection cannot be done. Using an error handler allows to get the real issue.

@fabpot
Copy link
Member Author

fabpot commented Jun 27, 2019

Failure unrelated

@fabpot fabpot added this to the 4.3 milestone Jun 27, 2019
@fabpot fabpot added the Mailer label Jun 27, 2019
@fabpot fabpot merged commit eb15bff into symfony:4.3 Jun 27, 2019
fabpot added a commit that referenced this pull request Jun 27, 2019
…ses an error before connect() (fabpot)

This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Fix error message when connecting to a stream raises an error before connect()

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | see swiftmailer/swiftmailer#1201
| License       | MIT
| Doc PR        | n/a

According to the PHP docs, "If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call.".

Using the `@` operator means that we get a generic error message without any clues about why connection cannot be done. Using an error handler allows to get the real issue.

Commits
-------

eb15bff [Mailer] fixed error message when connecting to a stream raises an error before connect()
@fabpot fabpot deleted the error-supp-mailer-stream branch July 18, 2019 20:17
@fabpot fabpot mentioned this pull request Jul 28, 2019
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.

None yet

2 participants