8000 [Form] Forward Form::submit(Request) to Form::HandleRequest by 0mars · Pull Request #16088 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Forward Form::submit(Request) to Form::HandleRequest #16088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Bug #13291: check Form::$submitted before handleRequest call
  • Loading branch information
0mars committed Oct 4, 2015
commit adb565528458c684e6149883f5a1aa297bbf620c
8 changes: 4 additions & 4 deletions src/Symfony/Component/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,14 +508,14 @@ public function handleRequest($request = null)
*/
public function submit($submittedData, $clearMissing = true)
{
if ($submittedData instanceof Request) {
return $this->handleRequest($submittedData);
}

if ($this->submitted) {
throw new AlreadySubmittedException('A form can only be submitted once');
}

if ($submittedData instanceof Request) {
return $this->handleRequest($submittedData);
}

// Initialize errors in the very beginning so that we don't lose any
// errors added during listeners
$this->errors = array();
Expand Down
0