10000 Bug #13291: check Form::$submitted before handleRequest call · 0mars/symfony@adb5655 · GitHub
[go: up one dir, main page]

Skip to content

Commit adb5655

Browse files
committed
Bug symfony#13291: check Form::$submitted before handleRequest call
1 parent 02992aa commit adb5655

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Form/Form.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,14 @@ public function handleRequest($request = null)
508508
*/
509509
public function submit($submittedData, $clearMissing = true)
510510
{
511-
if ($submittedData instanceof Request) {
512-
return $this->handleRequest($submittedData);
513-
}
514-
515511
if ($this->submitted) {
516512
throw new AlreadySubmittedException('A form can only be submitted once');
517513
}
518514

515+
if ($submittedData instanceof Request) {
516+
return $this->handleRequest($submittedData);
517+
}
518+
519519
// Initialize errors in the very beginning so that we don't lose any
520520
// errors added during listeners
521521
$this->errors = array();

0 commit comments

Comments
 (0)
0