diff --git a/classes/tl_nc_message.php b/classes/tl_nc_message.php index 64f14de0..1a41fed4 100644 --- a/classes/tl_nc_message.php +++ b/classes/tl_nc_message.php @@ -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); } diff --git a/composer.json b/composer.json index f48b2b37..8c803c65 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/library/NotificationCenter/Gateway/Email.php b/library/NotificationCenter/Gateway/Email.php index cbcd2820..db628f39 100644 --- a/library/NotificationCenter/Gateway/Email.php +++ b/library/NotificationCenter/Gateway/Email.php @@ -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') {