Commit 8cca3e25 authored by Fabian Galinski's avatar Fabian Galinski 😾
Browse files

[BUGFIX] Call to a member function getReplyTo() on null

parent 7d8b50f7
......@@ -777,6 +777,7 @@ class MailTemplateService {
$emailView->setTemplateSource($text);
return $emailView->render();
}
return $text;
}
......@@ -965,13 +966,14 @@ class MailTemplateService {
$layoutId = 0;
$templateContent = $defaultTemplateContent;
}
$this->setSubjectToSend($subject);
//TODO: is this object even in use somewhere?
$this->mailMessage->setSubject($subject);
if ($this->fromAddress === '') {
$fromMail = $this->parseMarkers(
empty($this->overwrittenFromMail) ? $template->getFromMail() : $this->overwrittenFromMail,
empty($this->overwrittenFromMail) && $template ? $template->getFromMail() : $this->overwrittenFromMail,
$emailView
);
$this->setFromAddress($fromMail);
......@@ -979,7 +981,7 @@ class MailTemplateService {
if ($this->fromName === '') {
$fromName = $this->parseMarkers(
(empty($this->overwrittenFromName) ? $template->getFromName() : $this->overwrittenFromName),
(empty($this->overwrittenFromName) && $template ? $template->getFromName() : $this->overwrittenFromName),
$emailView
);
$this->setFromName($fromName);
......@@ -987,7 +989,7 @@ class MailTemplateService {
if ($this->replyToAddress === '') {
$replyTo = $this->parseMarkers(
(empty($this->overwrittenReplyTo) ? $template->getReplyTo() : $this->overwrittenReplyTo),
(empty($this->overwrittenReplyTo) && $template ? $template->getReplyTo() : $this->overwrittenReplyTo),
$emailView
);
$this->setReplyToAddress($replyTo);
......@@ -995,7 +997,7 @@ class MailTemplateService {
if (empty($this->ccAddresses)) {
$cc = $this->parseMarkers(
(empty($this->overwrittenCc) ? $template->getCc() : $this->overwrittenCc),
(empty($this->overwrittenCc) && $template ? $template->getCc() : $this->overwrittenCc),
$emailView
);
$this->setCcAddresses($cc);
......@@ -1003,7 +1005,7 @@ class MailTemplateService {
if (empty($this->bccAddresses)) {
$bcc = $this->parseMarkers(
(empty($this->overwrittenBcc) ? $template->getBcc() : $this->overwrittenBcc),
(empty($this->overwrittenBcc) && $template ? $template->getBcc() : $this->overwrittenBcc),
$emailView
);
$this->setBccAddresses($bcc);
......@@ -1011,7 +1013,7 @@ class MailTemplateService {
if ($this->toAddresses === '') {
$toAddress = $this->parseMarkers(
(empty($this->overwrittenToAddresses) ? $template->getToAddress() : $this->overwrittenToAddresses),
(empty($this->overwrittenToAddresses) && $template ? $template->getToAddress() : $this->overwrittenToAddresses),
$emailView
);
$this->setToAddresses($toAddress);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment