Skip to content
Snippets Groups Projects

Issue #3373228: Undefined array key "swiftmailer"

1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -78,7 +78,7 @@ class WrapAndConvertEmailAdjuster extends EmailAdjusterBase implements Container
* {@inheritdoc}
*/
public function build(EmailInterface $email) {
if ($this->configuration['swiftmailer'] && $this->moduleHandler->moduleExists('swiftmailer')) {
if (isset($this->configuration['swiftmailer']) && $this->moduleHandler->moduleExists('swiftmailer')) {
// Add the CSS library to match Swiftmailer.
$theme = $email->getTheme();
$email->addLibrary("$theme/swiftmailer");
@@ -168,7 +168,7 @@ class WrapAndConvertEmailAdjuster extends EmailAdjusterBase implements Container
* The wrapped body.
*/
protected function render(EmailInterface $email, string $body, bool $is_html) {
if ($this->configuration['swiftmailer'] && $this->moduleHandler->moduleExists('swiftmailer') && ($message = $email->getParam('legacy_message'))) {
if (isset($this->configuration['swiftmailer']) && $this->moduleHandler->moduleExists('swiftmailer') && ($message = $email->getParam('legacy_message'))) {
$message['body'] = Markup::create($body);
$message['subject'] = $email->getSubject();
$render = [
Loading