8000
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 7ecff64 commit 22314ebCopy full SHA for 22314eb
form/multiple_buttons.rst
@@ -35,7 +35,7 @@ querying if the "Save and add" button was clicked::
35
Or you can get the button's name by using the
36
:method:`Symfony\\Component\\Form\\Form::getClickedButton` method of the form::
37
38
- if ('saveAndAdd' === $form->getClickedButton()->getName()) {
+ if ($form->getClickedButton() && 'saveAndAdd' === $form->getClickedButton()->getName()) {
39
// ...
40
}
41
0 commit comments