Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HeahDude authored Jul 25, 2017
1 parent 7ecff64 commit 22314eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion form/multiple_buttons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ querying if the "Save and add" button was clicked::
Or you can get the button's name by using the
:method:`Symfony\\Component\\Form\\Form::getClickedButton` method of the form::
if ('saveAndAdd' === $form->getClickedButton()->getName()) {
if ($form->getClickedButton() && 'saveAndAdd' === $form->getClickedButton()->getName()) {
// ...
}
Expand Down

0 comments on commit 22314eb

Please sign in to comment.