Fix incompatibility after Doctrine refactor

[MAILPOET-3662]
This commit is contained in:
Jan Lysý
2021-09-23 08:58:43 +02:00
committed by Veljko V
parent 857268c5ff
commit e9a4c6e090
2 changed files with 1 additions and 2 deletions

View File

@@ -229,7 +229,6 @@ class FormEditor {
if (isset($_GET['template_id'])) {
$template = $this->templatesRepository->getFormTemplate($_GET['template_id']);
$form = $template->toFormEntity();
$form = $form->toArray();
} else {
$form = $this->getFormData((int)$_GET['id']);
}

View File

@@ -66,7 +66,7 @@ class PreviewPage {
$formData = $this->wp->getTransient(self::PREVIEW_DATA_TRANSIENT_PREFIX . $id);
if (is_array($formData)) {
$form = new FormEntity($formData['name']);
$form->setId($formData['id']);
$form->setId($formData['id'] ?? 0);
$form->setBody($formData['body']);
$form->setSettings($formData['settings']);
$form->setStyles($formData['styles']);