Skip to content

Commit ad6c2e3

Browse files
detectFormRuntimeDataInRequest can return null (#335)
Co-authored-by: Stefan Hagspiel <shagspiel@dachcom.ch>
1 parent b8cf273 commit ad6c2e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/FormBuilderBundle/EventListener/Core/RequestListener.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public function onKernelRequest(RequestEvent $event): void
6363

6464
try {
6565
$formRuntimeData = $this->detectFormRuntimeDataInRequest($event->getRequest(), $formDefinition);
66+
67+
if (null === $formRuntimeData) {
68+
return;
69+
}
70+
6671
$form = $this->frontendFormBuilder->buildForm($formDefinition, $formRuntimeData);
6772
} catch (\Exception $e) {
6873
$this->generateErroredJsonReturn($event, $e);

0 commit comments

Comments
 (0)