check existence of form before using it

This commit is contained in:
Julien Fastré 2022-03-25 13:10:40 +01:00
parent 7a0234adb2
commit b423821ae9

View File

@ -283,7 +283,7 @@ final class DocGeneratorTemplateController extends AbstractController
} }
$datas = $context->getData($template, $entity, $contextGenerationData); $datas = $context->getData($template, $entity, $contextGenerationData);
if ($isTest && $form['show_data']->getData()) { if ($isTest && isset($form) && $form['show_data']->getData()) {
// very ugly hack... // very ugly hack...
dd($datas); dd($datas);
} }