8000 avoid deprecation notice due to calling `isValid` on an unsubmitted form · craue/CraueFormFlowBundle@7581671 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7581671

Browse files
committed
avoid deprecation notice due to calling isValid on an unsubmitted form
see symfony/symfony#17644
1 parent e6caef7 commit 7581671

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Form/FormFlow.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,10 @@ public function isValid(FormInterface $form) {
869869
))) {
870870
$form->handleRequest($request);
871871

872+
if (!$form->isSubmitted()) {
873+
return false;
874+
}
875+
872876
if ($this->hasListeners(FormFlowEvents::POST_BIND_REQUEST)) {
873877
$event = new PostBindRequestEvent($this, $form->getData(), $this->currentStepNumber);
874878
$this->eventDispatcher->dispatch(FormFlowEvents::POST_BIND_REQUEST, $event);

0 commit comments

Comments
 (0)
0