From: Seamus Lee Date: Tue, 21 Apr 2020 21:11:29 +0000 (+1000) Subject: dev/core#1717 Fix SMTP failure on fail to disconnect due to new wrapper smtp mailer X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=21832ae3056d2a5bd702b7c0a1771389753d49e9;p=civicrm-core.git dev/core#1717 Fix SMTP failure on fail to disconnect due to new wrapper smtp mailer Add in wrapper around to check if we can call it --- diff --git a/CRM/Utils/Mail/FilteredPearMailer.php b/CRM/Utils/Mail/FilteredPearMailer.php index 1c11e23d16..5ede19aa46 100644 --- a/CRM/Utils/Mail/FilteredPearMailer.php +++ b/CRM/Utils/Mail/FilteredPearMailer.php @@ -109,4 +109,11 @@ class CRM_Utils_Mail_FilteredPearMailer extends Mail { unset($this->_delegate->{$name}); } + public function disconnect() { + if (is_callable([$this->_delegate, 'disconnect'])) { + return $this->_delegate->disconnect(); + } + return TRUE; + } + }