{"action":"created","comment":{"url":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/comments/73563769","id":73563769,"diff_hunk":"@@ -1189,4 +1192,17 @@ public function getTimeout()\n     {\n         return $this->Timeout;\n     }\n+\n+    /**\n+     * Reports an error number and string.\n+     * @param integer $errno The error number returned by PHP.\n+     * @param string $errmsg The error message returned by PHP.\n+     */\n+    function errorHandler($errno, $errmsg)\n+    {\n+        $this->edebug(","path":"class.smtp.php","position":46,"original_position":46,"commit_id":"beeba1cca9c1372af9f2c8c9b94b0b0cd7d6d738","original_commit_id":"beeba1cca9c1372af9f2c8c9b94b0b0cd7d6d738","user":{"login":"Synchro","id":81561,"avatar_url":"https://avatars.githubusercontent.com/u/81561?v=3","gravatar_id":"","url":"https://api.github.com/users/Synchro","html_url":"https://github.com/Synchro","followers_url":"https://api.github.com/users/Synchro/followers","following_url":"https://api.github.com/users/Synchro/following{/other_user}","gists_url":"https://api.github.com/users/Synchro/gists{/gist_id}","starred_url":"https://api.github.com/users/Synchro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Synchro/subscriptions","organizations_url":"https://api.github.com/users/Synchro/orgs","repos_url":"https://api.github.com/users/Synchro/repos","events_url":"https://api.github.com/users/Synchro/events{/privacy}","received_events_url":"https://api.github.com/users/Synchro/received_events","type":"User","site_admin":false},"body":"This should call `setError` too. Otherwise If debugging is disabled, you'll never hear about the error - wasn't that the point of adding this?","created_at":"2016-08-04T17:15:40Z","updated_at":"2016-08-04T17:15:40Z","html_url":"https://github.com/PHPMailer/PHPMailer/pull/791#discussion_r73563769","pull_request_url":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/791","_links":{"self":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/comments/73563769"},"html":{"href":"https://github.com/PHPMailer/PHPMailer/pull/791#discussion_r73563769"},"pull_request":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/791"}}},"pull_request":{"url":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/791","id":79934249,"html_url":"https://github.com/PHPMailer/PHPMailer/pull/791","diff_url":"https://github.com/PHPMailer/PHPMailer/pull/791.diff","patch_url":"https://github.com/PHPMailer/PHPMailer/pull/791.patch","issue_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/791","number":791,"state":"open","locked":false,"title":"Improve error handling for connection failures.","user":{"login":"oadaeh","id":376249,"avatar_url":"https://avatars.githubusercontent.com/u/376249?v=3","gravatar_id":"","url":"https://api.github.com/users/oadaeh","html_url":"https://github.com/oadaeh","followers_url":"https://api.github.com/users/oadaeh/followers","following_url":"https://api.github.com/users/oadaeh/following{/other_user}","gists_url":"https://api.github.com/users/oadaeh/gists{/gist_id}","starred_url":"https://api.github.com/users/oadaeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oadaeh/subscriptions","organizations_url":"https://api.github.com/users/oadaeh/orgs","repos_url":"https://api.github.com/users/oadaeh/repos","events_url":"https://api.github.com/users/oadaeh/events{/privacy}","received_events_url":"https://api.github.com/users/oadaeh/received_events","type":"User","site_admin":false},"body":"Hello.\r\n\r\nFirst off, I want to say thank you for your continued work with maintaining and improving this project. I have been using it for many years, even as far back as when it was hosted on SourceForge.\r\n\r\nHowever, I feel that the way that the output for the call to stream_socket_client() (and fsockopen()) is handled is not good, in that it is suppressing all errors by proceeding it with an error control operator.\r\n\r\nI am in the process upgrading the Drupal PHPMailer module (https://www.drupal.org/project/phpmailer) to work with Drupal 8. In my testing, I was troubleshooting problems with connecting to my mail server (which works just fine with other programs), and because the error control operator was there to suppress the errors, I only got the last of three errors and was troubleshooting the wrong problem.\r\n\r\nOnly by removing the error control operator and allowing all messages to be shown, was I able to see what the real problem was and correctly diagnose and fix it.\r\n\r\nIn searching through the issues for this repository for similar problems, it seems to me that there have been several instances where not having the error control operator in place might have resulted in the problem being solved quicker, and potentially, without even having an issue posted, especially with insecure SSL problems and this issue, where the author practically stated as much:\r\nhttps://github.com/PHPMailer/PHPMailer/issues/243#issuecomment-45979467\r\n\r\nI understand the reasoning for having the error control operator in place, but I think the reasons for not having it there are stronger.\r\n\r\nDuring my research and troubleshooting of my problems, I came across this article titled HOW TO: Catch PHP Errors and Warnings:\r\nhttps://www.cubewebsites.com/blog/development/php/how-to-catch-php-errors-and-warnings/\r\n\r\nUsing and tweaking the method presented in that post, I was able to modify the code in PHPMailer to not only not spew PHP notices all over the page, but to also save and record all of the errors that are reported by both stream_socket_client() and fsockopen(). (I actually started the process with PHPMailer 5.2.5, because for me, that was a known working version. Once I was positive I had everything working with my code there, I bumped PHPMailer up to the latest stable 5.x version (5.2.16) and made sure my code still worked there.)\r\n\r\nI saw that some minor side discussion happened about something similar in this issue, starting at this comment:\r\nhttps://github.com/PHPMailer/PHPMailer/pull/339#issuecomment-68200766\r\nand continuing with this one for three comments:\r\nhttps://github.com/PHPMailer/PHPMailer/pull/339#issuecomment-68433835\r\nbut it didn't go anywhere.\r\n\r\nMy pull request does not do anything with SSL/TLS, and is simply a generic method for catching and reporting multiple errors that could be used in other places.\r\n\r\nFeel free to make recommendations for improvement.  Although my coding style is different than yours, I tried to mimic your style, but I might have missed something.\r\n\r\nThank you for you time and attention with this.\r\n","created_at":"2016-08-03T16:10:11Z","updated_at":"2016-08-04T17:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e5efed58b91f56a0aba032b0b2143bd00130d66","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/791/commits","review_comments_url":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/791/comments","review_comment_url":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/791/comments","statuses_url":"https://api.github.com/repos/PHPMailer/PHPMailer/statuses/beeba1cca9c1372af9f2c8c9b94b0b0cd7d6d738","head":{"label":"oadaeh:master","ref":"master","sha":"beeba1cca9c1372af9f2c8c9b94b0b0cd7d6d738","user":{"login":"oadaeh","id":376249,"avatar_url":"https://avatars.githubusercontent.com/u/376249?v=3","gravatar_id":"","url":"https://api.github.com/users/oadaeh","html_url":"https://github.com/oadaeh","followers_url":"https://api.github.com/users/oadaeh/followers","following_url":"https://api.github.com/users/oadaeh/following{/other_user}","gists_url":"https://api.github.com/users/oadaeh/gists{/gist_id}","starred_url":"https://api.github.com/users/oadaeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oadaeh/subscriptions","organizations_url":"https://api.github.com/users/oadaeh/orgs","repos_url":"https://api.github.com/users/oadaeh/repos","events_url":"https://api.github.com/users/oadaeh/events{/privacy}","received_events_url":"https://api.github.com/users/oadaeh/received_events","type":"User","site_admin":false},"repo":{"id":64857937,"name":"PHPMailer","full_name":"oadaeh/PHPMailer","owner":{"login":"oadaeh","id":376249,"avatar_url":"https://avatars.githubusercontent.com/u/376249?v=3","gravatar_id":"","url":"https://api.github.com/users/oadaeh","html_url":"https://github.com/oadaeh","followers_url":"https://api.github.com/users/oadaeh/followers","following_url":"https://api.github.com/users/oadaeh/following{/other_user}","gists_url":"https://api.github.com/users/oadaeh/gists{/gist_id}","starred_url":"https://api.github.com/users/oadaeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oadaeh/subscriptions","organizations_url":"https://api.github.com/users/oadaeh/orgs","repos_url":"https://api.github.com/users/oadaeh/repos","events_url":"https://api.github.com/users/oadaeh/events{/privacy}","received_events_url":"https://api.github.com/users/oadaeh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oadaeh/PHPMailer","description":"The classic email sending library for PHP","fork":true,"url":"https://api.github.com/repos/oadaeh/PHPMailer","forks_url":"https://api.github.com/repos/oadaeh/PHPMailer/forks","keys_url":"https://api.github.com/repos/oadaeh/PHPMailer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oadaeh/PHPMailer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oadaeh/PHPMailer/teams","hooks_url":"https://api.github.com/repos/oadaeh/PHPMailer/hooks","issue_events_url":"https://api.github.com/repos/oadaeh/PHPMailer/issues/events{/number}","events_url":"https://api.github.com/repos/oadaeh/PHPMailer/events","assignees_url":"https://api.github.com/repos/oadaeh/PHPMailer/assignees{/user}","branches_url":"https://api.github.com/repos/oadaeh/PHPMailer/branches{/branch}","tags_url":"https://api.github.com/repos/oadaeh/PHPMailer/tags","blobs_url":"https://api.github.com/repos/oadaeh/PHPMailer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oadaeh/PHPMailer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oadaeh/PHPMailer/git/refs{/sha}","trees_url":"https://api.github.com/repos/oadaeh/PHPMailer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oadaeh/PHPMailer/statuses/{sha}","languages_url":"https://api.github.com/repos/oadaeh/PHPMailer/languages","stargazers_url":"https://api.github.com/repos/oadaeh/PHPMailer/stargazers","contributors_url":"https://api.github.com/repos/oadaeh/PHPMailer/contributors","subscribers_url":"https://api.github.com/repos/oadaeh/PHPMailer/subscribers","subscription_url":"https://api.github.com/repos/oadaeh/PHPMailer/subscription","commits_url":"https://api.github.com/repos/oadaeh/PHPMailer/commits{/sha}","git_commits_url":"https://api.github.com/repos/oadaeh/PHPMailer/git/commits{/sha}","comments_url":"https://api.github.com/repos/oadaeh/PHPMailer/comments{/number}","issue_comment_url":"https://api.github.com/repos/oadaeh/PHPMailer/issues/comments{/number}","contents_url":"https://api.github.com/repos/oadaeh/PHPMailer/contents/{+path}","compare_url":"https://api.github.com/repos/oadaeh/PHPMailer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oadaeh/PHPMailer/merges","archive_url":"https://api.github.com/repos/oadaeh/PHPMailer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oadaeh/PHPMailer/downloads","issues_url":"https://api.github.com/repos/oadaeh/PHPMailer/issues{/number}","pulls_url":"https://api.github.com/repos/oadaeh/PHPMailer/pulls{/number}","milestones_url":"https://api.github.com/repos/oadaeh/PHPMailer/milestones{/number}","notifications_url":"https://api.github.com/repos/oadaeh/PHPMailer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oadaeh/PHPMailer/labels{/name}","releases_url":"https://api.github.com/repos/oadaeh/PHPMailer/releases{/id}","deployments_url":"https://api.github.com/repos/oadaeh/PHPMailer/deployments","created_at":"2016-08-03T15:39:02Z","updated_at":"2016-08-03T15:39:04Z","pushed_at":"2016-08-03T15:53:05Z","git_url":"git://github.com/oadaeh/PHPMailer.git","ssh_url":"git@github.com:oadaeh/PHPMailer.git","clone_url":"https://github.com/oadaeh/PHPMailer.git","svn_url":"https://github.com/oadaeh/PHPMailer","homepage":null,"size":3389,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PHPMailer:master","ref":"master","sha":"4f7967ac91a25e8838fdb59df2f45030a1d39bc5","user":{"login":"PHPMailer","id":3959702,"avatar_url":"https://avatars.githubusercontent.com/u/3959702?v=3","gravatar_id":"","url":"https://api.github.com/users/PHPMailer","html_url":"https://github.com/PHPMailer","followers_url":"https://api.github.com/users/PHPMailer/followers","following_url":"https://api.github.com/users/PHPMailer/following{/other_user}","gists_url":"https://api.github.com/users/PHPMailer/gists{/gist_id}","starred_url":"https://api.github.com/users/PHPMailer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PHPMailer/subscriptions","organizations_url":"https://api.github.com/users/PHPMailer/orgs","repos_url":"https://api.github.com/users/PHPMailer/repos","events_url":"https://api.github.com/users/PHPMailer/events{/privacy}","received_events_url":"https://api.github.com/users/PHPMailer/received_events","type":"Organization","site_admin":false},"repo":{"id":2253830,"name":"PHPMailer","full_name":"PHPMailer/PHPMailer","owner":{"login":"PHPMailer","id":3959702,"avatar_url":"https://avatars.githubusercontent.com/u/3959702?v=3","gravatar_id":"","url":"https://api.github.com/users/PHPMailer","html_url":"https://github.com/PHPMailer","followers_url":"https://api.github.com/users/PHPMailer/followers","following_url":"https://api.github.com/users/PHPMailer/following{/other_user}","gists_url":"https://api.github.com/users/PHPMailer/gists{/gist_id}","starred_url":"https://api.github.com/users/PHPMailer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PHPMailer/subscriptions","organizations_url":"https://api.github.com/users/PHPMailer/orgs","repos_url":"https://api.github.com/users/PHPMailer/repos","events_url":"https://api.github.com/users/PHPMailer/events{/privacy}","received_events_url":"https://api.github.com/users/PHPMailer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PHPMailer/PHPMailer","description":"The classic email sending library for PHP","fork":false,"url":"https://api.github.com/repos/PHPMailer/PHPMailer","forks_url":"https://api.github.com/repos/PHPMailer/PHPMailer/forks","keys_url":"https://api.github.com/repos/PHPMailer/PHPMailer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PHPMailer/PHPMailer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PHPMailer/PHPMailer/teams","hooks_url":"https://api.github.com/repos/PHPMailer/PHPMailer/hooks","issue_events_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/events{/number}","events_url":"https://api.github.com/repos/PHPMailer/PHPMailer/events","assignees_url":"https://api.github.com/repos/PHPMailer/PHPMailer/assignees{/user}","branches_url":"https://api.github.com/repos/PHPMailer/PHPMailer/branches{/branch}","tags_url":"https://api.github.com/repos/PHPMailer/PHPMailer/tags","blobs_url":"https://api.github.com/repos/PHPMailer/PHPMailer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PHPMailer/PHPMailer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PHPMailer/PHPMailer/git/refs{/sha}","trees_url":"https://api.github.com/repos/PHPMailer/PHPMailer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PHPMailer/PHPMailer/statuses/{sha}","languages_url":"https://api.github.com/repos/PHPMailer/PHPMailer/languages","stargazers_url":"https://api.github.com/repos/PHPMailer/PHPMailer/stargazers","contributors_url":"https://api.github.com/repos/PHPMailer/PHPMailer/contributors","subscribers_url":"https://api.github.com/repos/PHPMailer/PHPMailer/subscribers","subscription_url":"https://api.github.com/repos/PHPMailer/PHPMailer/subscription","commits_url":"https://api.github.com/repos/PHPMailer/PHPMailer/commits{/sha}","git_commits_url":"https://api.github.com/repos/PHPMailer/PHPMailer/git/commits{/sha}","comments_url":"https://api.github.com/repos/PHPMailer/PHPMailer/comments{/number}","issue_comment_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/comments{/number}","contents_url":"https://api.github.com/repos/PHPMailer/PHPMailer/contents/{+path}","compare_url":"https://api.github.com/repos/PHPMailer/PHPMailer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PHPMailer/PHPMailer/merges","archive_url":"https://api.github.com/repos/PHPMailer/PHPMailer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PHPMailer/PHPMailer/downloads","issues_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues{/number}","pulls_url":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls{/number}","milestones_url":"https://api.github.com/repos/PHPMailer/PHPMailer/milestones{/number}","notifications_url":"https://api.github.com/repos/PHPMailer/PHPMailer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PHPMailer/PHPMailer/labels{/name}","releases_url":"https://api.github.com/repos/PHPMailer/PHPMailer/releases{/id}","deployments_url":"https://api.github.com/repos/PHPMailer/PHPMailer/deployments","created_at":"2011-08-23T07:57:17Z","updated_at":"2016-08-04T14:25:14Z","pushed_at":"2016-08-03T16:10:11Z","git_url":"git://github.com/PHPMailer/PHPMailer.git","ssh_url":"git@github.com:PHPMailer/PHPMailer.git","clone_url":"https://github.com/PHPMailer/PHPMailer.git","svn_url":"https://github.com/PHPMailer/PHPMailer","homepage":null,"size":4931,"stargazers_count":6746,"watchers_count":6746,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3930,"mirror_url":null,"open_issues_count":50,"forks":3930,"open_issues":50,"watchers":6746,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/791"},"html":{"href":"https://github.com/PHPMailer/PHPMailer/pull/791"},"issue":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/791"},"comments":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/791/comments"},"review_comments":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/791/comments"},"review_comment":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/pulls/791/commits"},"statuses":{"href":"https://api.github.com/repos/PHPMailer/PHPMailer/statuses/beeba1cca9c1372af9f2c8c9b94b0b0cd7d6d738"}}}}
{"actor":{"display_login":"Synchro"}}