Skip to content

Commit

Permalink
Merge branch 'hotfix/1.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Jan 26, 2018
2 parents e5a1db6 + 5dc7ca8 commit b3ec1c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/tl_nc_message.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function toggleVisibility($intId, $blnVisible)
if (is_array($GLOBALS['TL_DCA']['tl_nc_message']['fields']['published']['save_callback'])) {
foreach ($GLOBALS['TL_DCA']['tl_nc_message']['fields']['published']['save_callback'] as $callback) {
if (is_array($callback)) {
$blnVisible = \System::importStatic($callback[0])->$callback[1]($blnVisible, $this);
$blnVisible = \System::importStatic($callback[0])->{$callback[1]}($blnVisible, $this);
} elseif (is_callable($callback)) {
$blnVisible = $callback($blnVisible, $this);
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description":"Notification Center extension for Contao Open Source CMS",
"keywords":["contao", "notification", "center"],
"type":"contao-module",
"license":"LGPL-3.0+",
"license":"LGPL-3.0-or-later",
"authors":[
{
"name":"terminal42 gmbh",
Expand Down
6 changes: 5 additions & 1 deletion library/NotificationCenter/Gateway/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ public function send(Message $objMessage, array $arrTokens, $strLanguage = '')

// Override SMTP settings if desired
if (version_compare(VERSION, '4.4', '>=') && $this->objModel->email_overrideSmtp) {
$transport = \Swift_SmtpTransport::newInstance($this->objModel->email_smtpHost, $this->objModel->email_smtpPort);
if (method_exists(\Swift_SmtpTransport::class, 'newInstance')) {
$transport = \Swift_SmtpTransport::newInstance($this->objModel->email_smtpHost, $this->objModel->email_smtpPort);
} else {
$transport = new \Swift_SmtpTransport($this->objModel->email_smtpHost, $this->objModel->email_smtpPort);
}

// Encryption
if ($this->objModel->email_smtpEnc === 'ssl' || $this->objModel->email_smtpEnc === 'tls') {
Expand Down

0 comments on commit b3ec1c1

Please sign in to comment.