Skip to content

Commit

Permalink
[TASK] Readd null return
Browse files Browse the repository at this point in the history
  • Loading branch information
b13-michaelsemle committed Mar 12, 2024
1 parent c2fff19 commit 9c42d12
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Classes/Domain/Finisher/EmailTemplateFinisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ public function __construct(
) {
}

protected function executeInternal(): void
protected function executeInternal()
{
$emailTemplateUid = $this->options['emailTemplateUid'] ?? null;
// For v10 compatibility reasons we check for [Empty] value
if (empty($emailTemplateUid) || $emailTemplateUid === '[Empty]') {
parent::executeInternal();
return;
return null;
}

// Fallback to default in case doktype changed and the selected page
// is no longer an email template
$page = GeneralUtility::makeInstance(PageRepository::class)->getPage($emailTemplateUid);
if ((int)$page['doktype'] !== $this->configuration->getDokType()) {
parent::executeInternal();
return;
return null;
}

$languageBackup = null;
Expand Down Expand Up @@ -154,6 +154,8 @@ protected function executeInternal(): void
} else {
$mail->send();
}

return null;
}

protected function getStandaloneView(string $title, FormRuntime $formRuntime, string $format = 'txt'): StandaloneView
Expand Down

0 comments on commit 9c42d12

Please sign in to comment.