Skip to content

Commit c690974

Browse files
liaynmschwemer
authored andcommitted
[BUGFIX] Handle missing form in flexform data in PluginPreviewRenderer
Resolves: #1223
1 parent f51591f commit c690974

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Classes/Hook/PluginPreviewRenderer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function getPluginInformation(string $pluginName, array $row): string
9393
'row' => $row,
9494
'flexFormData' => $this->flexFormData,
9595
'formUid' => $this->getLocalizedFormUid(
96-
(int)$this->flexFormData['settings']['flexform']['main']['form'],
96+
(int)($this->flexFormData['settings']['flexform']['main']['form'] ?? 0),
9797
$row['sys_language_uid']
9898
),
9999
'receiverEmail' => $this->getReceiverEmail(),
@@ -102,7 +102,7 @@ protected function getPluginInformation(string $pluginName, array $row): string
102102
'pluginName' => $pluginName,
103103
'enableMailPreview' => !ConfigurationUtility::isDisablePluginInformationMailPreviewActive(),
104104
'form' => $this->getFormTitleByUid(
105-
(int)$this->flexFormData['settings']['flexform']['main']['form'],
105+
(int)($this->flexFormData['settings']['flexform']['main']['form'] ?? 0),
106106
),
107107
]
108108
);
@@ -120,7 +120,7 @@ protected function getLatestMails($row): QueryResultInterface
120120
/** @var MailRepository $mailRepository */
121121
$mailRepository = GeneralUtility::makeInstance(MailRepository::class);
122122
return $mailRepository->findLatestByFormAndPage(
123-
(int)$this->flexFormData['settings']['flexform']['main']['form'],
123+
(int)($this->flexFormData['settings']['flexform']['main']['form'] ?? 0),
124124
(int)$row['pid']
125125
);
126126
}

0 commit comments

Comments
 (0)