Skip to content

Commit adb5655

Browse files
committed
Bug #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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy