Explorar o código

Merge pull request #3696 from wearemarketing/fix-duplicated-submit

remove call twice to "submit"
Sullivan SENECHAL %!s(int64=9) %!d(string=hai) anos
pai
achega
66cb40000d
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      Controller/CRUDController.php

+ 1 - 3
Controller/CRUDController.php

@@ -361,9 +361,7 @@ class CRUDController extends Controller
         $form->setData($object);
         $form->setData($object);
         $form->handleRequest($request);
         $form->handleRequest($request);
 
 
-        if ($this->getRestMethod() == 'POST') {
-            $form->submit($request);
-
+        if ($request->isMethod('POST')) {
             $isFormValid = $form->isValid();
             $isFormValid = $form->isValid();
 
 
             // persist if the form was valid and if in preview mode the preview was approved
             // persist if the form was valid and if in preview mode the preview was approved