We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55812c7 commit 6da03aaCopy full SHA for 6da03aa
src/Controller/Admin/BlogController.php
@@ -86,9 +86,8 @@ public function new(
86
87
$form->handleRequest($request);
88
89
- // the isSubmitted() method is completely optional because the other
90
- // isValid() method already checks whether the form is submitted.
91
- // However, we explicitly add it to improve code readability.
+ // The isSubmitted() call is mandatory because the isValid() method
+ // throws an exception if the form has not been submitted.
92
// See https://symfony.com/doc/current/forms.html#processing-forms
93
if ($form->isSubmitted() && $form->isValid()) {
94
$entityManager->persist($post);
0 commit comments